Skip to main content

How to set default permissions for newly created FTP account ?

Comments

8 comments

  • Leo Tse
    I just found that I could read or write usual files like html, css, js, etc. It's the dotfiles that I had problem with. I am trying to upload a .env file since it's mandatory for my web application. Please help, much thanks!
    0
  • Infopro
    Permissions should be set for addon FTP accounts without changing anything. What issue are you having uploading a dot file?
    0
  • Leo Tse
    Here is the error returned from FileZilla (FTP):
    Command: CWD /public_html/webapp Response: 250 OK. Current directory is /public_html/webapp Command: TYPE A Response: 200 TYPE is now ASCII Command: PASV Response: 227 Entering Passive Mode (192,243,214,195,220,222) Command: STOR .env Response: 553 Can't open that file: Permission denied
    It returned a 553 permission denied error if I tired uploading the .env file; other than that, it would return a 550 Could not delete error if I tried to delete any existing dotfile.
    0
  • Infopro
    Uploading a file and opening a file on the server are two different things of course. Your error says it can't open that file. Uploading a file via Filezilla should leave that file owned by you. I suppose you could try renaming the file, upload it to the server and then change the name of the file back again.
    I am trying to upload a .env file since it's mandatory for my web application.

    What is the application?
    0
  • Leo Tse
    It's a web app built with a PHP framework called Laravel (ver. 5.2). I think it's caused by directory permissions of the FTP accounts/Apache, or some sort of initial settings on cPanel that I missed. Because I couldn't even edit and save the .env file using File Manager.
    0
  • Infopro
    You've no doubt seen these pages I take it: Installation - Laravel - The PHP Framework For Web Artisans Configuration - Laravel - The PHP Framework For Web Artisans Permissions should be set properly when you created the addon FTP account. Should this be setup in an addon FTP account, does it matter? I can't answer that. They do have forums though, and there are threads related to cPanel you might take a closer look at for tips on getting this going: Laracasts Web Development Forum
    0
  • Leo Tse
    Yes, you're absolutely correct, FTP account's permissions were set correctly when it was created. I finally figured it out what happened. It's a silly mistake caused by myself. I logged in as root to install some cPanel plugins and forgot to logout and git-cloned the web app to the public_html directory; thus the web app directory belongs to root and the FTP account has limited access in there. Thank you for answering my questions!
    0
  • Infopro
    Excellent. Thanks for updating the thread.
    0

Please sign in to leave a comment.