Link to home
Start Free TrialLog in
Avatar of Jhonn_Sorroza
Jhonn_SorrozaFlag for United States of America

asked on

access to website folder in apache server

what is the best way to give a developer access to a website folder inside /var/www/html/web_site
i want him to be able to use wsftp to access that folder and write to it if he needs to replace a file.
do i add him to the apache group? if so how? or is there better way?
Avatar of Tintin
Tintin

If the developer is the only person who needs to change the files,  change ownership on the folder/files to the developer user.
while using wsftp does the user login to the server by using his own username and password ??

in that case just give the read and write permission to that folder for the user Or create a group , then change the group owner ship of the directory to that group and give that group read and write permission on that folder
Avatar of Jhonn_Sorroza

ASKER

yes, there is only one developer at the moment, and he is using his own user name and password. it would be best to create a group so in the future i can add users to it if need be.
but will changing the permission to that folder from apache.apache to his group effect the website? when they click on the url that points to that folder?
if you check the ls of that direcotyr

you will see something

drwxr-xr-x  2 root   root 4096 Jan 12 10:42 babyeczema


or drwxr-xr-x  2 apache   root 4096 Jan 12 10:42 website

as long as file has owner ship to apache it should be fine

just change the group from root / apache to your group and give permission to Read and write , and Other permisison should be same as it is


If you want to go down the group route, then you just need to make sure the permissions are 775 on directories and 664 on files

It doesn't really matter who owns the files, unless you have some CGI or PHP processes that write files within your document root.

this is how it looks now:

drwxrwxr-x 11 apache apache 4096 Jan 22 08:35 new_site

i created a group for the developer(s).
OK, now you need to do

chgrp -R devgroup new_site

and make sure all the files have 664 permissions
SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks again, that worked great, much appreciated.
"chgrp -R developer new_site"