Gentoo Archives: gentoo-user

From: Andrey Vul <andrey.vul@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: dir is rwx but can't create file
Date: Thu, 29 Jul 2010 13:00:31
Message-Id: AANLkTimHHzcw0MRDp9yfOuyKi5DHjkkSgo7V-f4JK1wx@mail.gmail.com
In Reply to: [gentoo-user] Re: dir is rwx but can't create file by Andrey Vul
1 While /tmp's mode is 1777, it doesnt make a difference since the same
2 error occurs with /etc, /lib32, and /var.
3
4 On 2010-07-29, Andrey Vul <andrey.vul@×××××.com> wrote:
5 > Also, echo > /tmp/foo => same thing
6 > It looks like a problem with open(..., O_CREAT|O_TRUNC, 644), but i'll
7 > retry strace'ing the open,write and see where the problem chain starts
8 >
9 > On 2010-07-29, Andrey Vul <andrey.vul@×××××.com> wrote:
10 >> If / was mounted ro, touch would output strerror(EROFS), not
11 >> strerror(ENOENT)
12 >>
13 >> On 2010-07-28, Bill Longman <bill.longman@×××××.com> wrote:
14 >>> On 07/28/2010 01:52 PM, Alan McKinnon wrote:
15 >>>> On Wednesday 28 July 2010 22:20:17 Andrey Vul wrote:
16 >>>>> Creating files in /tmp, /etc, /lib32, and /var return ENOENT (touch
17 >>>>> /tmp/foo => strerror(ENOENT)).
18 >>>>> However, this is done as root and the dirs are marked 755 root:root.
19 >>>>> df -i shows only 2% inode usage.
20 >>>>> Any explanation as to why a rwx-ed dir can't be written to? This is
21 >>>>> breaking quite a few of the init scripts.
22 >>>>>
23 >>>>> --
24 >>>>> Andrey Vul
25 >>>>> begin-base64 600 sig
26 >>>>> bXNuLCBob21lOiBhbmRyZXkudnVsQGdtYWlsLmNvbQ0KdSBvZiB0OiBhbmRyZXkudnVsQHV0b3J
27 >>>>> v bnRvLmNhDQpzbXMsIHZvaWNlbWFpbDogNDE2MzAzOTkyMw0K
28 >>>>> `
29 >>>>> end
30 >>>>
31 >>>> sounds like / is mounted read-only
32 >>>
33 >>> Do read-only filesystems typically reply ENOENT when trying to create a
34 >>> file? It's usually something like "read-only filesystem" in that case.
35 >>> ENOENT means it can't even find the file.
36 >>>
37 >>>
38 >>
39 >> --
40 >> Sent from my mobile device
41 >>
42 >> Andrey Vul
43 >> begin-base64 600 sig
44 >> bXNuLCBob21lOiBhbmRyZXkudnVsQGdtYWlsLmNvbQ0KdSBvZiB0OiBhbmRyZXkudnVsQHV0b3Jv
45 >> bnRvLmNhDQpzbXMsIHZvaWNlbWFpbDogNDE2MzAzOTkyMw0K
46 >> `
47 >> end
48 >>
49 >
50 > --
51 > Sent from my mobile device
52 >
53 > Andrey Vul
54 > begin-base64 600 sig
55 > bXNuLCBob21lOiBhbmRyZXkudnVsQGdtYWlsLmNvbQ0KdSBvZiB0OiBhbmRyZXkudnVsQHV0b3Jv
56 > bnRvLmNhDQpzbXMsIHZvaWNlbWFpbDogNDE2MzAzOTkyMw0K
57 > `
58 > end
59 >
60
61 --
62 Sent from my mobile device
63
64 Andrey Vul
65 begin-base64 600 sig
66 bXNuLCBob21lOiBhbmRyZXkudnVsQGdtYWlsLmNvbQ0KdSBvZiB0OiBhbmRyZXkudnVsQHV0b3Jv
67 bnRvLmNhDQpzbXMsIHZvaWNlbWFpbDogNDE2MzAzOTkyMw0K
68 `
69 end