FTP User cannot modify files but has correct permissions
- by Lothar_Grimpsenbacher
I have created a new user (foo) and when he logs in via ftp he cannot edit the files in the directory to which he has access.
In the directory he can log into ls -l gives me:
-rw-rw-r-- 1 root www-pub 6427 Nov 17 04:21 index.html
The user belongs to the group www-pub. Here is the output of cat /etc/group to demonstrate that he is indeed in that group:
...
www-pub:x:1001:ftpuser,www-data,foo
foo:x:1002:
*edit the permissions on the containing directory are:
drwxrwsr-x 5 root www-pub 4096 Nov 17 02:53 thecontainingdir
and the one above that:
drwxrwsr-x 49 root www-pub 4096 Nov 16 02:40 thenextdirup
So since he can log in via ftp and since the file he needs to edit has the correct permissions to let the group www-pub read and write the file and he is a member of that group, why can't he edit it (or upload anything)?
Only when I change the file to 777 can he edit it. It's as if he's NOT in the group... but he is! What's going on?