[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

vsFTP configuration and the htm directory

Posted on 2004-10-27
7
Medium Priority
?
636 Views
Last Modified: 2013-12-16
I need to give a group of users permission to write to the /var/www/html/ directory of a Redhat Core 2 installation.  I have an active apache 2.xx server running, with this as the primary directory.

Did I mention I need to do this all through an ssh connection?

Step by step would be an excellent help.
0
Comment
Question by:preserver3
[X]
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
  • 5
  • 2
7 Comments
 
LVL 6

Expert Comment

by:blkline
ID: 12434510
Before you can get explicit instructions you need to add a few more details.  The most important details is how are the users going to do the updates?  Are they local to the machine?  Are they Linux/Unix users?  Are they Windows users?     Will they be doing this through a Windows share?  FTP?  SFTP?

Answer these and we can give you a better answer.
0
 
LVL 1

Author Comment

by:preserver3
ID: 12435040
I was going to update this question a bit today, I hope this is enough info.

My users are a mix of Mac, Windows, and Linux users

my current /etc/vsftpd/vsftpd.conf file looks like this
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
local_root=/var/www/html
file_open_mode=0777
cmds_allowed=ABOR,CWD,DELE,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RETR,RMD,RNFR,RNTO,SITE,SIZE,STOR


It seems to work on one of my machines, and not the other.

I have 6 user accounts, I've created in the ordinary way(ie normal linux users).  I would like to group each and give each a different configuration of commands.  One of the user accounts, I'd like to give only read access.

Any suggestions?
0
 
LVL 1

Author Comment

by:preserver3
ID: 12435515
As another note... I need to know what I need to add to my configuration to allow at least one user to use dreamweaver to connect to the site directly.

0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 6

Accepted Solution

by:
blkline earned 2000 total points
ID: 12435594
If I were doing this I'd do it like this:

1)   groupadd htmlauthors
2)   for each of your users:
            usermod -g htmlauthors myuser
3)   chgrp htmlauthors /var/www/html
4)   chmod g+rwx /var/www/html

The only con to this method is that if the group permissions will get funky if those users actually sign on to that server to do their own work.  Then you need to worry about group permissions on the other things that they create.  If you are only allowing them on to work with this directory then you should be good to go.  You man need to change the umask parameter in your vsftp.conf file so that each file is created r/w within the group -- test it and see.

Another alternative with vsftp (I think, I don't use it) is to have the users assume another identity after authenticating.  You could take advantage of that to allow access to the directory, after giving the appropriate permissions to the directory.
0
 
LVL 1

Author Comment

by:preserver3
ID: 12437820
I tried your example, but my users can't create files or directories in the html directory... is there something wrong with my configuration file?  Thanks for your help so far.


0
 
LVL 1

Author Comment

by:preserver3
ID: 12437838
false alarm...  It just didn't give them access to the directories further down the tree.

Thanks!
0
 
LVL 1

Author Comment

by:preserver3
ID: 12443620
I've got a problem....  

Files created under the group users are being assigned to the individual users and not to apache.  Additionally, I'm guessing because I changed my umask to 077 and not 0775 that that's why I can't delete files I've uploaded in previous sessions.

Any other insights you can provide?

Oh, and for the benefit of the PAQ, add SYST to the end of the cmds_allowed=... line... It's suprising how many errors you'll get from ftp clients without that entry.

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!

Question has a verified solution.

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

Fine Tune your automatic Updates for Ubuntu / Debian
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

656 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