Input some text, and on :wq! received file write error.
used file browser, and looked at properties of “/home/userID/documents” owner, group, others file rights could not be set to read/write.
‘others’ is not a standard group; normally it is ‘users’; check whether you have created the group ‘others’ correctly.
Normally you cannot create the first version of a file in another user’s /home; the user has to create it and then change the properties to allow other users to write to it.
iskko wrote:
> Brushing up on VI and had the following problem.
>
> vi /home/userID/documents/new.txt
>
> Input some text, and on :wq! received file write error.
> used file browser, and looked at properties of “/home/userID/documents”
> owner, group, others file rights could not be set to read/write.
It would help if you do:
$ id userID
$ stat /home/userID/documents/new.txt
for us.
Most likely the file has been created by another user.
john hudson wrote:
> ‘others’ is not a standard group; normally it is ‘users’; check whether
> you have created the group ‘others’ correctly.
<grin>
See chmod(1)
‘others’ is the set of users that are not in [owner,group]
A combination of the letters ugoa controls which users’ access to the
file will be changed: the user who owns it (u), other users in the
file’s group (g), other users not in the file’s group (o), or all users
(a).
iskko wrote:
> LittleRedRooster;1944802 Wrote:
>> iskko wrote:
>>> Brushing up on VI and had the following problem.
>>>
>>> vi /home/userID/documents/new.txt
>>>
>>> Input some text, and on :wq! received file write error.
>>> used file browser, and looked at properties of
>> “/home/userID/documents”
>>> owner, group, others file rights could not be set to read/write.
>> It would help if you do:
> Code:
> --------------------
> > >
> > $ id userID
> > $ stat /home/userID/documents/new.txt
> >
> --------------------
>> for us.
>> Most likely the file has been created by another user.
>
> On this machine i’m the only user, and was creating the file from
> scratch into my documents directory. I guess I have to touch it first?
No, you don’t.
Still waiting for the output of the two cammands I requested.
Btw: also check if the ‘documents’ directory has the write bit set for group
users.
Out put as follow, i expected the file stat as the file dosen’t exist yet.
iskko@linux-vit5:~/Desktop> id iskko
uid=1000(iskko) gid=100(users) groups=16(dialout),33(video),100(users)
iskko@linux-vit5:~/Desktop> stat /home/iskko/documents/new.txt
stat: cannot stat `/home/iskko/documents/new.txt’: No such file or directory
iskko wrote:
> LittleRedRooster;1944878 Wrote:
>> iskko wrote:
>>> LittleRedRooster;1944802 Wrote:
>>>> iskko wrote:
>>>>> Brushing up on VI and had the following problem.
>>>>>
>>>>> vi /home/userID/documents/new.txt
>>>>>
>>>>> Input some text, and on :wq! received file write error.
>>>>> used file browser, and looked at properties of
>>>> “/home/userID/documents”
>>>>> owner, group, others file rights could not be set to read/write.
>>>> It would help if you do:
>>> Code:
>>> --------------------
>>> > >
>>> > $ id userID
>>> > $ stat /home/userID/documents/new.txt
>>> >
>>> --------------------
>>>> for us.
>>>> Most likely the file has been created by another user.
>>> On this machine i’m the only user, and was creating the file from
>>> scratch into my documents directory. I guess I have to touch it
>> first?
>>
>> No, you don’t.
>> Still waiting for the output of the two cammands I requested.
>> Btw: also check if the ‘documents’ directory has the write bit set for
>> group
>> users.
>
> Out put as follow, i expected the file stat as the file dosen’t exist
> yet.
Ah, I thought it did but vi could write to the file.
> iskko@linux-vit5:~/Desktop> id iskko
> uid=1000(iskko) gid=100(users) groups=16(dialout),33(video),100(users)
That looks ok.
> iskko@linux-vit5:~/Desktop> stat /home/userID/documents/new.txt
> stat: cannot stat `/home/userID/documents/new.txt’: No such file or
> directory
>
> /home/iskko/documents directory
^
> drwxrwxr-x 2 iskko users 4096 2009-02-13 11:34 Documents
^
Do you have maybe two directories, one called ‘Documents’ and one called
‘documents’ (notice the upper/lower case first letter)?
Remember that Unices are case-sensitive, names have to be followed exact.
iskko wrote:
> LittleRedRooster;1945063 Wrote:
>> iskko wrote:
…]
>>> /home/iskko/documents directory
>> ^
>>> drwxrwxr-x 2 iskko users 4096 2009-02-13 11:34 Documents
>> ^
>>
>> Do you have maybe two directories, one called ‘Documents’ and one
>> called
>> ‘documents’ (notice the upper/lower case first letter)?
>>
>> Remember that Unices are case-sensitive, names have to be followed
>> exact.
>
>
> Now you see what three year away from UNIX does. You got it, I missed
> the case on the Documents directory. Thanks.
Good of you to report back here, thanks, and good to know it’s solved.