I've created a user that's locked down to it's home directory and does nothing else but allow a client to upload an ftp file to us - hands slightly tied at the moment regarding that, so I've had to do it.
I don't want to use this new ftpuser for anything else at all, I'd rather use a different user, myuser that handles other data imports.
So I've made myuser part of the ftpuser group and set the /home/ftpuser folder to 775 and chrgrp myuser but I still can't access the contents of the folder.
$ pwd /home $ ls -la total 44 drwxr-xr-x. 7 root root 4096 Jun 13 10:48 . dr-xr-xr-x. 23 root root 4096 May 18 11:41 .. drwxrwx--- 2 ftpuser myuser 4096 Jul 12 16:47 ftpuser drwx------ 14 myuser myuser 4096 Jun 29 17:08 myuser $ ls ftpuser/ ls: cannot open directory ftpuser/: Permission denied $ ls myuser/ bin tmp vhosts $ id myuser uid=502(myuser) gid=503(www-data) groups=503(www-data),505(ftpuser) Do home folders have some additional restrictions on them that stop me doing this, or am I missing something obvious?
I'm on CentOS 6.5
newgrpcommand.newgrpis probably your best bet. The primary group onmyuseriswww-dataso it needs to be switched to one of the supplementary groups after login.myuseris not even listed as a group when I runid- why does themyuserfolder have that as it's group in that case?newgrpthing totally fixed it... so someone should answer so I can accept, not sure if I can accept you both