We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

access to website folder in apache server

Medium Priority
427 Views
Last Modified: 2013-12-02
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?
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2007

Commented:
If the developer is the only person who needs to change the files,  change ownership on the folder/files to the developer user.
Top Expert 2009

Commented:
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

Author

Commented:
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?
Top Expert 2009

Commented:
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


CERTIFIED EXPERT
Top Expert 2007

Commented:
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.

Author

Commented:
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).
CERTIFIED EXPERT
Top Expert 2007

Commented:
OK, now you need to do

chgrp -R devgroup new_site

and make sure all the files have 664 permissions
CERTIFIED EXPERT
Top Expert 2007
Commented:
If the new group isn't the primary group for the developers, then you'll need to add the GUID bit on the directory/s to ensure new files/dirs are created with that group.

chmod g+s new_site

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Top Expert 2009
Commented:
yes change the group with

chgrp -r grupname new_site

or chgrp -R developer new_site

r for recursive .

the permission is allright.

but add that user to that developer group

Author

Commented:
thanks again, that worked great, much appreciated.
"chgrp -R developer new_site"
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.