Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to change the permissions to multiple files at once?

Discussion in 'General Discussion' started by robi_70, Feb 10, 2016.

  1. robi_70

    robi_70 Member

    Joined:
    Jul 25, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Hi,

    I moved to a new server with cPanel account with PrestaShop installed there (on the old server was also Cpanel). Unfortunately, for reasons unknown to me on the new server, all files are PrestaShop powers 666. A should be 644.
    Presta has a huge number of files in multiple directories and subdirectories.

    Is there a simple way to change the permissions of all files?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Code:
    find /home/username/public_html/prestashop -type d -perm 0777 -exec chmod 755 {} \;
    find /home/username/public_html/prestashop -type f -perm 0666 -exec chmod 644 {} \;
    Assuming thats where your shop is, they should work.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. robi_70

    robi_70 Member

    Joined:
    Jul 25, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    I'm not an expert in this field. Please tell me where I got this code apply?
    I logged in to the server via SSH (puty) and I wanted to use this code, but getting feedback messages such as: "-bash: -type: command not found", "-bash: type: -perm: not found", "..."

    What am I doing wrong?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Do you have root access to this server?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. robi_70

    robi_70 Member

    Joined:
    Jul 25, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
  6. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    42
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,
    May I know are you access your server directly with root user or first access server with super-user then root?
    Also, let me know which OS installed on your server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. robi_70

    robi_70 Member

    Joined:
    Jul 25, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    excuse me! My mistake.
    I made a mistake typing a command!
    Now it is discovered.

    The code worked.
    Thanks a lot!
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    I am happy to see you were able to address the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice