Find the answer to your Linux question:
Results 1 to 2 of 2
Hi everybody, I have been searching around to find an explanation or a tutorial, but I still have this problem. I am configuring a web server on a CentOS, and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    laa
    laa is offline
    Just Joined! laa's Avatar
    Join Date
    Jul 2009
    Posts
    1

    [vsftpd]File rights problem with web server (Apache)


    Hi everybody,

    I have been searching around to find an explanation or a tutorial, but I still have this problem.

    I am configuring a web server on a CentOS, and I want web server files to be uploaded through FTP.
    So I set up vsftpd. Currently, it is working BUT I have a problem of rights...

    By "default", /var/www/html is owned by apache.
    But the ftp is uploading files owned by the ftp user. More problematic, I can't modify or suppress anything, because files are owned by apache.


    I tried :
    • adding ftp to apache group (files affected to apache group with the good rights) : I can modify existing files through FTP, but any new file added through FTP is still owned by ftp
    • user nobody and group nobody for these files, but then FTP list is empty (vsftpd config for my user : "anon_world_readable_only=NO")


    I don't know what to do there...

    Thanks for any help !
    LAA

  2. #2
    Just Joined!
    Join Date
    Jul 2009
    Posts
    58
    FTP uses the login name as the owner of the files. Don't use 'root' as your ftp user. Create a new user, put them in a 'www' group and change the /var/www/html directory to be owned by www.

    search for stickybit, and umask on how to use them properly to keep the group permissions as new files are created.

Posting Permissions

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