Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004

    chmod got messed up

    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)?

  2. #2
    Join Date
    Mar 2006

    for a whole directory under Linux :

    chmod -R 777 folder

    This changes all with 777 in this folder.

    Check the files have the right owner too.
    If not :

    chown -R ownerwner folder

    Hope this helps. - Web Hosting with DDoS Protection | Shared & Reseller in Europe/North America
    Linux/Windows RDP VPS 13 Locations : UK, US (5 states), Mexico, Canada, Bulgaria, Lithuania,
    Italy, France, Germany,Netherlands, Switzerland, Rissia, Singapore | OpenVPN/PPTP Enabled
    INSTANT | PayPal, Skrill, Payza, Bitcoin, WebMoney, Perfect Money, Ukash, CashU, paysafecard

  3. #3
    Join Date
    Sep 2000
    Alberta, Canada
    All files except in the 'cgi-bin' dir should be 644.
    All directories should be 755.

    cd /home/username/public_html/
    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 - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts