I Need new sftp login details for developers but that is restricted to /var/www/html/
using ssh
. They have to be able to edit and save files, also when the user makes changes I don't want the group changing to the users group once they make changes, if that makes sense.
Asked
Active
Viewed 1,922 times
-2
-
1what system is it? – matcheek Jul 04 '13 at 21:45
-
Centos 6.3, Zend community server on Rackspace Cloud if that's any help. – Joe Moe Jul 05 '13 at 19:01
3 Answers
1
You could use ACLs here.
Create your user with useradd. Then grant him the correct permission on /var/www/html
#> setfacl -m u:myuser:rwx /var/www/html
Use -R option, to modify all the subdirectories
#> setfacl -R -m u:myuser:rwx /var/www/html
Verify that it worked by using getfacl
#> getfacl /var/www/html
Also for your group name request, you might want to flag the html directory with the setgid flag chmod +s /var/www/html

Pooria Pahlevani
- 5
- 3

Spredzy
- 965
- 8
- 11
0
You can create a user with
useradd -D /var/www/html xyz
so /var/www/html will be the default home directory for user xyz , but if you are running apache and /var/www/htmlis home directory than this solution is not gonna work.
Instead you should create a user with any other home directory and restrict user with SUDO access for APACHE.

Abhishek Anand Amralkar
- 1,979
- 12
- 16
0
I will suggest you to use httpd-itk from epel to run each site by own user. And proftpd (mod_sftp) to gain access to the web root.

ALex_hha
- 7,193
- 1
- 25
- 40