How can I change permissions of the Cygwin folder in Windows 7?

Posted on

QUESTION :

Every time I want to change permissions through explorer I get an access denied error, and I’m using an administrator account.

What I need is to add an script to the /bin directory, but I’m not allowed to write there…

ANSWER :

You should not be adding personal scripts to /bin or /usr/bin

Those should go in ~/bin

$ touch blah.sh

$ mkdir ~/bin

$ mv blah.sh ~/bin

$ echo 'PATH+=:~/bin' >> ~/.bash_profile

I had a similar issue, my system had gone through a lot of changes: switching domains, different user accounts, etc. I needed to replace /etc/passwd with the current output from mkpasswd but couldn’t find any way to adjust the permissions on that folder/file even with my current user who was an administrator.

The problem turned out to be that the windows owner of the c:cygwin folder was some “unknown user” (probably from the old domain). So using my current account with admin privileges I changed the owner of the c:cygwin hierarchy to my current account, then I could adjust the permissions on /etc/passwd to allow me to change it.

Leave a Reply

Your email address will not be published. Required fields are marked *