Upload file as root user 404
Hi there
I'm using SFTP to access the root directory on a new server which I own. If I upload a file to a public_html folder for one of the accounts then the file doesn't appear in the browser. For example if it's the index.html then it'll return a 404 error. However, if I upload the same file using standard ftp as the account owner then the site will function properly.
In the ftp client the file will show the owner as either 'root' or 'user' but the permissions will stay at 644.
Can someone tell me what I'm doing wrong and why the files uploaded as root aren't being found?
Thank you all for your time.
J
-
Check the ownership of files in both cases after uploading. 0 -
The ownership reflects the identity of the uploader; 'root' for root and 'accountname' when using normal ftp. Will that be it? If so is there any way to work around it and still use root ftp? 0 -
You can use apache cgi mode. In the suphp mode, file ownership must be the same as the account. 0 -
Can someone tell me what I'm doing wrong and why the files uploaded as root aren't being found?
Hello, You'll need to update the ownership of the files you upload as "root" to the account username. You can do this via the "chown" command via SSH. Or, simply login via SFTP as the account username to avoid this issue. Thanks!0
Please sign in to leave a comment.
Comments
4 comments