CYGWIN File permissions problems
Written by John
Thursday, 6 August 2009 02:27
I’m currently using cygwin to sync files between my Linux dev environment and windows. It’s not that often because I mainly develop on a Linux desktop anyways. However, I recently ran into some problems with rsync. I kept getting file permissions errors when using rsync to sync from my windows desktop to my Linux server.
After some digging I found that when doing a “ls -l”, none of the file permissions were setup on any of the folders that were being synced. After looking on the internet, all the articles lead me to believe I needed to set my CYGWIN variable to ntsec.
So I went ahead and set my CYGWIN variable to ntsec, but the problem was still there. I had a little plus at the end of the file permissions list and none of them were set. It looked something like this.
d———+
I had almost given up when I found an old program I was using before, which is a stripped down version of cygwin and rsync with a cmd file for doing the sync. In there I discovered that they set the CYGWIN variable to nontsec!
So there it is, I set CYGWIN to nontsec and everything worked great!
For those of you who would like the steps to permanently fix this, here they are.
- Make sure you have vim or some other editor installed.
- Edit your .bash_profile in your home directory. $ vim ~/.bash_profile
- Add this line to the bottom of the file: export CYGWIN=”nontsec”
- Save the file and quit. for vim type :qw
- Restart cygwin
You should now see file permissions setup on all your directories and files!
I hope this helps out someone else who fould all the posts out there to be very confusing and not very informative!
No related posts.
Actually, the issue stems from a incorrect value in /etc/passwd for the NT user you are using.
Swap the :513: default group settings to :545: and voila it works.
Ciao
Cheers for the informative post – I enjoyed reading it! I always enjoy reading your blog.