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...

  • If you are really a member of group Administrators, then Explorer should offer to elevate when you try to change the permissions (i.e., you should see UAC shield icons on the buttons you have to click in the properties dialog). Are you sure you're a member of group Administrators?
    – Fran
    May 28, 2012 at 21:06
  • @Fran: only if the owner of the file allows it, as I discovered (see my answer below). The OP may need to adjust the owner of the c:\cygwin tree in order to change /etc/passwd.
    – Bogatyr
    Aug 29, 2012 at 16:18

2 Answers 2


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.