I needed to upload a bunch of files from my local Windows machine to a Linux webserver. I have the Windows version of tar, so I tarred them all, uploaded the tar, and then untarred it on the Linux server.
In doing this, the permissions appear to have been messed up. Everything has a chmod of 0700 and I get a lot of Permission Denied errors.
I'm not that good with Linux, but I know some files need to be 644 and some need to be 766 and others need to be 777. How exactly do I go about doing this (there's lots of directories and subdirectories as well)?
All files except in the 'cgi-bin' dir should be 644.
All directories should be 755.
chmod -R 755 ./ << this is for directories at that level and all sub-directories
chmod -R 644 *.html .gif .jpg .php << add any other extensions needed
After doing the above, then you would chmod the different permissions for the whatever directories as there shouldn't be that many. Also, using permissions of 777 on any directory leaves you open to being hacked. Better to use 775 with ownership permissions of: username.nobody
• PotentProducts.com - for all your Hosting needs
• Helping people Host, Create and Maintain their Web Site
• ServerAdmin Services also available