[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-09-30
7
Medium Priority
?
294 Views
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.
0
Comment
Question by:sah18
  • 4
  • 2
7 Comments
 
LVL 7

Accepted Solution

by:
jackiechen858 earned 2000 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.
0
 
LVL 9

Expert Comment

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

Author Comment

by:sah18
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?
0
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!

 
LVL 9

Author Comment

by:sah18
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?
0
 
LVL 7

Expert Comment

by:jackiechen858
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 )
0
 
LVL 7

Expert Comment

by:jackiechen858
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.
0
 
LVL 7

Expert Comment

by:jackiechen858
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.

Otherwise
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

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…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month19 days, 3 hours left to enroll

834 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