How to set default permissions for newly created FTP account ?
Greetings,
I've googled for almost an hour but couldn't find how I could configure default permissions for newly created FTP accounts under each cPanel account. I'm learning to be a server admin.
Here are what I did:
1. I've successfully installed WHM & cPanel on a Centos-7 VPS.
2. I've created a new cPanel account and successfully pointed a domain to the newly created cPanel account.
3. I then created a new FTP account under that new cPanel account.
4. I could connect to the FTP server using FileZilla with the new FTP account's credentials, but I could not upload any files (Error 553).
Does anyone know how I could configure the global setting for FTP? So that every FTP account can read and write on their FTP server upon every new account creation?
Thanks in advance.
-
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 -
Permissions should be set for addon FTP accounts without changing anything. What issue are you having uploading a dot file? 0 -
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 -
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 -
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 -
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 -
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 -
Excellent. Thanks for updating the thread. 0
Please sign in to leave a comment.
Comments
8 comments