Solved

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

Posted on 2011-09-30
7
244 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 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.
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now