ftp users permission denied

Discussion in 'Installation/Configuration' started by ariban99, Feb 3, 2017.

  1. ariban99

    ariban99 Member

    Hi,
    I created an ftp user and i tried to use it to write to the server, and i get permission denied error, i searched google and i found this solution
    chown -R -v -f web7 web

    but it tells me
    failed to change ownership of ‘web’ to web7

    i am using centos 7 with ispconfig 3.1 p1
    any help would greatly be appreciated.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There should be no need for such a manual change as the web folder and ftp user have the same owner. You tried to upload a file to the "web" folder of the site, not the / folder?
     
  3. ariban99

    ariban99 Member

    thats correct, in the web folder, the user that i created the ftp for, he said he tried to overwrite some files in the web folder, but gets an error of permissions not allowing him to.
    he is accessing it remotely, i am not sure if that makes a difference! he can login and access it, he can read the files but not overwrite them with new files.
     
  4. ariban99

    ariban99 Member

    here is the error the ftp gives, and this is me on the same lan network trying, only root user can write! i tried to OVERWRITE the php.ini in the /web folder and got the below error

    Status: Starting upload of C:\Users\blush\Desktop\php.ini
    Command: PASV
    Response: 227 Entering Passive Mode (192,168,1,20,125,239)
    Command: STOR php.ini
    Response: 553 Can't open that file: Permission denied
    Error: Critical file transfer error
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    And which user owns that php.ini file? Check with "ls -la" in the web folder.
     
  6. ariban99

    ariban99 Member

    results of ls -al /var/www/matchmyshidduch.com/
    lrwxrwxrwx 1 root root 30 Jul 27 2016 /var/www/matchmyshidduch.com -> /var/www/clients/client0/web7/

    it seems like root has the ownership, but in ispconfig, when i create a user, shouldn't that user also get access automatically? is there a way to allow the users to have access?
    i tried chown -R -v -f web7 web
    but it tells me failed to change ownership of ‘web’ to web7
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The ownership of the symlink is fine and has to be root, the ownership of the link is not the cause. You have to enter the folder and then run ls command to get the the ownership of the web folder:

    cd /var/www/matchmyshidduch.com
    ls -la
     
  8. ariban99

    ariban99 Member

    sorry about that, here are the results, how do i resolve the issue? also how do i make sure when i create a new user either for this site or another sight on the same vhosts that i wont have this problem?

    total 12
    drwxr-xr-x 11 web7 client0 111 Feb 2 13:41 .
    drwxr-xr-x 9 root root 4096 Jul 27 2016 ..
    drwxr-xr-x 2 web7 client0 6 Jul 27 2016 backup
    drwxr-xr-x 2 web7 client0 6 Jul 27 2016 cgi-bin
    drwxr-xr-x 2 root root 6 Feb 2 13:44 home
    drwxr-xr-x 2 root root 4096 Feb 6 00:06 log
    drwx--x--- 2 web7 client0 6 Jul 27 2016 private
    drwxr-xr-x 2 root root 6 Jul 27 2016 ssl
    drwxrwxrwx 2 web7 client0 6 Feb 6 10:07 tmp
    drwxrwxrwx 11 10009 504 4096 Feb 5 21:00 web
    drwx--x--- 2 web7 client0 6 Jul 27 2016 webdav


     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The web directory has indeed a wrong owner (not even existing owner), maybe it was copied from another server?

    To fix it, run:

    chattr -i /var/www/clients/client0/web7
    chown -R web7:client0 /var/www/clients/client0/web7/web
    chattr +i /var/www/clients/client0/web7
     
  10. ariban99

    ariban99 Member

    thank you for the fix
    no it was a fresh install using your tutorial!

     
  11. ariban99

    ariban99 Member

    could the problem be from the settings:

    Set folder permissions on update NO SELECTED
    Make web folders immutable (extended attributes) SELECTED
    Add web users to -sshusers- group SELECTED
    Connect Linux userid to webid NOT SELECTED
    Start ID for userid/webid connect 10000
     
  12. bwogi emma

    bwogi emma New Member

    @till, Have the same problem where users get access denied which i belie is because of permission issues, have tried reassigning permissions using commands below but still get error. Kindly help
    chattr -i /var/www/clients/client8/web10
    chown -R web10:client8 /var/www/clients/client8/web10/web
    chattr +i /var/www/clients/client8/web10
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Which users?
    What were the owners before you did chown -R web10:client8 ?
    Can you show ls -lh for that web directory?
     
  14. bwogi emma

    bwogi emma New Member

    @Taleman Thank you, was able to sort the problem,pureftpd was failing to connect to mysql.
     

Share This Page