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

Posted on 2011-09-30
Last Modified: 2012-05-12
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.
Question by:sah18
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2

Accepted Solution

jackiechen858 earned 500 total points
ID: 36893434
What's the ftp user you are using to login to the server?

you can ssh to the server, sudo to root,

run "chown -R ftpuser /var/www/html"

so the /var/www/html will be owned by the ftp user.

Expert Comment

ID: 36894856
You can use sftp as the ftp client for Dreamweaver and provide root credentials for login then.

Author Comment

ID: 36909322
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?
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.


Author Comment

ID: 36909339
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?

Expert Comment

ID: 36932115
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 )

Expert Comment

ID: 36932132
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.

Expert Comment

ID: 36932306
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.


Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (, affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question