Link to home
Start Free TrialLog in
Avatar of sah18
sah18Flag for United States of America

asked on

How to allow Apache web site docs folder and subfolders to be modified remotely

We have a CentOS server setup recently & it's running Apache.  If I ssh and log into the console, I can edit any /var/www/html docs that I need to if I use sudo to do the edits.

However, I would like to use Dreamweaver on my local system to do my edits, then ftp them over directly.  I'm able to successfully connect via Dreamweaver, and can do the edits, but since I don't have a way to "sudo" via Dreamweaver (unless there is a way???), I can't actually edit anything.

What do I need to change on the server to allow me to be able to make my edits remotely via Dreamweaver (over secure ftp)?

I do this routinely on a hosted web site that I have that runs on some flavor of linux, but I have no idea how the company sets this up on their end to allow such direct edits to the web files.
ASKER CERTIFIED SOLUTION
Avatar of jackiechen858
jackiechen858
Flag of Canada image

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
You can use sftp as the ftp client for Dreamweaver and provide root credentials for login then.
Avatar of sah18

ASKER

I currently have my Dreamweaver site setup to connect via SFTP to the web server.  However, I only have my own login to the server, and don't know the actual root password.  I am in the sudo-ers group, and can sudo needed commands at the command prompt, however, I don't see a way in the Dreamweaver server settings to have it allow me to act as root.  Is there something I'm missing in how to set this up?
Avatar of sah18

ASKER

Also, specifically to jackiechen -- I'd prefer this be more general than only for my specific user login, if possible.  Right now, I'm the only one needing to make these changes, but down the road, we'll at least have 1 or 2 other users who will need to make edits to the web folder content as well.  Is there a way to do with a group owning that folder?  If so, can you lead me through it (group creation, adding a user to the group, and having the group own the www folder)... or will this not work?
chown -R ftpuser:somegroup /var/www/html  
(  you can create a new group on the server , and include all the users you want have access in it)


chmod -R g+w  /var/www/html    ( this allow all users belong to the somegroup have write permission )
on centos, to add an new group, you can run groupadd somegroup; if you already have a group somegroup, you can run vigr to edit group. you need to know how to use vi.
for all the users, you might want to make sure their default group ( the fouth colume in /etc/passwd file be the groupid for somegroup ( you can see it be vigr).

This way when they create new file on /var/www/html, it will be owned by theiruser:somegroup, then anybody else can also edit it.

Otherwise