linux - Centos unable to upload file permission denied error

07
2013-09
  • user170773

    Yesterday I installed vsftpd in my centos server. But I am not able to upload files permission denied error. So I set owner and 775 file permission, and also i set 777 permission and then also I cant able to upload the file.

    Here I am sending the link which i have followed.

    http://www.server-world.info/en/note?os=CentOS_6&p=ftp

    Please anyone help me to solve the problem.

  • Answers
  • mogul

    Make sure user has write permission to the directory where file is going to be saved.

    We have seen that user create files as the temp1 user, so one solution could be to make temp1 own the destination directory.

    If that is impractical, an other solution could be to use group membership, either by chgrp'ing destination to tempftp or by adding user temp1 to the group that actually owns the destination.


  • Related Question

    linux - Correctly configuring file permissions in Ubuntu for FTP access
  • Sam152

    I am trying to setup a LAMP stack on my Ubuntu box. Apache, PHP and MySQL work and I have installed proftpd for FTP access to my www/ folder. The problem is, I'm not sure how to configure the permissions so that I have full access to that entire folder and all its files AND all the future files I dump in there.

    I have been messing around and am able to put files into the folder but new directories and the uploaded files have restrictive permissions. Is it possible to set the max permissions for that folder indefinitely so that I always have full access to it and all its sub folders/files under any conditions.

    Thanks for the help.


  • Related Answers
  • John T

    You will have to change the umask for proftpd.

    The configuration file is located under /etc/proftpd.conf or /usr/local/etc/proftpd.conf depending on your install, and it uses Apache-like directives (full details found here). For a specific directory you can use a <Directory> block directive in the configuration file pointing to your www folder.

    In there, ensure you have a umask directive like so:

    <Directory /var/www>
    umask 0000
    </Directory>
    

    Remember, the umask is the value subtracted from 777 to create the default permission for a new folder, and 666 for files (no execute bit by design).