Permission to directory via SSH

aristomania

Member
Sep 17, 2013
7
0
1
cPanel Access Level
Root Administrator
Im trying to add permissions to a full directory with all subfolders and files etc etc
Ive tried with
Code:
chmod -R 775 /home/user/public_html/directory
On SSH when I press enter to the command it gives no error or anything just success!
But then I go to the FTP and still cant transfer files to that specific directory....
What Im doing wrong?
Also Im using the master FTP account, shouldnt I have the right full permissions already?

Thank you
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

Is there a specific reason you require those permissions on the directories? You should not have to modify the default directory permissions in order to upload files via FTP. The default 0755 permissions are recommended for directories with files available to the public. What specific error message are you receiving when attempting to upload files to your account via FTP?

Thank you.
 

aristomania

Member
Sep 17, 2013
7
0
1
cPanel Access Level
Root Administrator
I require those permissions because Ive tried million times uploading files and each time I get "error 553 you dont have permission to upload"
Ive tried everything from changing permissions on cpanel and ftp but nothing..
The only way it seems is changing the permssions to 777 via SSH with chmod -R, and I have to give permissions each time I need to upload to that specific folder...
It somehow resets permissions everyday because Im having the same error on the folder wich I gave permission a week ago, now I get the error again...
anyway Thanks
 
Last edited:

24x7server

Well-Known Member
Apr 17, 2013
1,907
95
78
India
cPanel Access Level
Root Administrator
Hello,

Can you please try to update the correct ownership of your all files and folder and after that try to upload the files. I think there is an issues with the ownership of your files.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Feel free to open a support ticket using the URL in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

rachelm

Well-Known Member
Verifed Vendor
Jan 26, 2005
94
1
158
By any chance did you create the folder via ssh then try to ftp files to it? If so the folder will be owned by root, so 755 would stop the user but 777 would allow it since it's global perms.

Solution would be to chown the folder (and any contents) to the site username. Then you should be able to set perms of 755 and upload. Also, if you are running suhosin you might need to change perms for the folder to 750.