Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    vsftp setup for apache

    Hopefully someone can help with this.

    Like many here I am new to Linux and am using FC5 and have Apache running on it. My objective is to create a test environment for websites but I can't figure out how to get the security set up correctly to allow me to ftp files directly to the server from my development machine.

    So far I have created a username of ftpguy and can connect to the ftp server (vsftp) with this ID fine. It dumps me in the home directory /home/ftpguy but I can't change to /var/www/html to post files. I also created a group called webpostr and changed the group ownership of /var/www/html then put a symbolic link in the /home/ftpguy directory to /var/www/html. I still can't change to this folder from ftp (I can logged in as root). Do I also need to change the permissions to the /var directory? I a bit afraid to mess with that because I don't want to hose the system.

    Hopefully I explained that well enough, I am used to the Microsoft model on shares where you just assign permissions the folder etc. The unix security is still confusing to me.

    I have been fighting with this quite a bit and any links with info for doing this would be appriecated. I update websites via ftp and just want to duplicate that setup on my Fedora box.

    Thanks in advance.

    Steve H.

  2. #2
    I accomplish what you seek using Samba. Create a new share for /var/www/html and make sure that you force user = root and you will be able to copy and paste HTML docs in this directory - bypassing the need and headache of ftp. This is the way I set up all of my Apache servers and it works like a charm.

  3. #3
    Here is a snippit of my smb.conf to be used as a reference:

    [Web Site]

    force user = root
    valid users = username goes here
    user = all usernames go here
    path = /var/www/html
    write list = usernames go here

    Be sure to place valid smb user accounts under the valid users and user entries and once completed, issue /etc/init.d/smb restart and or samba restart.

  4. $spacer_open
  5. #4

    Ok I tried SMB

    I had previously tried to get Samba working also. I can connect shares but can't do anything other than browse files. There is a permissions issue again apparently, maybe you can tell me what I'm doing wrong here.

    workgroup = Mshome
    ; security = USER
    username map = /etc/samba/smbusers
    path = /usr/local/test2
    writeable = yes
    valid users = melissa, steve, steveh
    browseable = yes
    create mask = 0700
    path = /test3
    writeable = yes
    browseable = yes
    guest ok = yes
    path = /backup
    writeable = yes
    valid users = melissa, steve, steveh
    browseable = yes
    create mask = 0700

    force user = root
    valid users = steve
    user = steve
    path = /var/www/html
    write list = steve
    writeable = yes
    browseable = yes

    Here is the current state of the unix permissions on the directory test3. I've tried many other things.

    drwxr-xr-x 2 root root 4096 Aug 12 22:11 test
    drwxrwxrwx 2 nobody users 4096 Aug 17 18:43 test3

  6. #5


    Can anyone please help with this?

  7. #6
    I don't see anything obviously wrong, have your restarted smb once you made the changes to smb.conf. Have you double checked your smb user passwords?

  8. #7
    On another note, have you enabled Samba through your firewall and have you disabled SE Linux!?

  9. #8

    it was SELinux

    SELinux was blocking both FTP and Samba. Both are working now. Thanks for the help!

    Steve H.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts