• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 389
  • Last Modified:

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?
0
Jhonn_Sorroza
Asked:
Jhonn_Sorroza
  • 4
  • 3
  • 3
2 Solutions
 
TintinCommented:
If the developer is the only person who needs to change the files,  change ownership on the folder/files to the developer user.
0
 
fosiul01Commented:
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
0
 
Jhonn_SorrozaAuthor 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?
0
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

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


0
 
TintinCommented:
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.

0
 
Jhonn_SorrozaAuthor 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).
0
 
TintinCommented:
OK, now you need to do

chgrp -R devgroup new_site

and make sure all the files have 664 permissions
0
 
TintinCommented:
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
0
 
fosiul01Commented:
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
0
 
Jhonn_SorrozaAuthor Commented:
thanks again, that worked great, much appreciated.
"chgrp -R developer new_site"
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now