Changing the permissions of a folder via the command line

7,490

If it is a windows host, try icacls:

icacls foldername

this will print out the existing perms.

icacls directory_name /grant your_group:F /t

this will grant full control recursively to the directory to your group (or substitute your username)

Share:
7,490

Related videos on Youtube

ridermansb
Author by

ridermansb

I’ve been in the information technology area for over 17 years, working in and out of Brazil. Throughout my journey, I’ve developed software that communicated with automated robots, created applications and web pages, worked in emerging startups, and specialised myself in front-end technologies. I'm curious, enthusiastic and student most of the time, like the rest of the time to write code, especially in Javascript.

Updated on September 18, 2022

Comments

  • ridermansb
    ridermansb over 1 year

    I use FileZila, and must give 777 permissions to a folder on my site.

    This folder contains the database file.

    FileZila tried changing the folder permissions, the command is running smoothly but the permissions are not changed.

    How can I do this via the command line in windows (cmd)? I managed to connect, list and even send files via FTP using Windows cmd but I can not change the permissions of a file or folder.

    • Zoredache
      Zoredache over 12 years
      What type of FTP server, what OS is the server running on? Are you even permitted to modify permissions?
    • ridermansb
      ridermansb over 12 years
      OS: Windows. I am the owner of the folder
    • ridermansb
      ridermansb over 12 years
      One of the tags on this post indicates the OS (Windows 7)
    • MDMarra
      MDMarra over 12 years
      You can't give 777 to a Windows folder. Windows doesn't use the Unix Owner/Group/World permission structure.