Chown Folder and Files
If you have files stored on a shared server, it is normal to transfer all files back in forth under your username. More than likely, your hosting provider only allows you access to your account. In this case, files are moved back and forth while you are logged in under your username, hence files are owned by you.
However, in a virtual private server(VPS) or dedicated server, you will be able to login with secure FTP to any account or with the root login. In any case, the user will have ownership of the files for each account. For example, if you login as root, and transfer files from your pc to an account while logged in as ‘root’, ‘root’ will be the owner of the files. Meanwhile if you logged in to a specific account with a username like ‘myUserName’ with myUserName’s password, myUsername would be the owner of files transfered from your pc.
It is important to know how files are transfered because it could be the reason you cannot transfer them.
If you want to stay organized, you can login to your VPS or dedicated server with SSH Putty, and use CHOWN to change folder and file ownership.
To CHOWN folder and all files within a directory,
1) Find directory path.
1) chown -R username /home/username/public_html/mysite.com
This Unix command above will chown all files within the mysite.com directory. Now, you could login to the account under the username and transfer files back and forth between your pc and server.
Note: If you used the command ‘chown -R root /home/username/public_html/mysite.com’ and logged in with secure FTP as username, you would not have permission to transfer files.