File permissions different inside and outside cygwin root
Steven Penny
svnpenn@gmail.com
Fri May 22 01:32:00 GMT 2015
On Thu, May 21, 2015 at 7:33 AM, DeTracey, Brendan wrote:
> $ touch /cygdrive/c/Temp/testfile
> $ ll /cygdrive/c/Temp/testfile
> -rw-rwxr--+ 1 detraceyb Domain Users 0 May 21 09:23 /cygdrive/c/Temp/testfile*
What you are seeing is the current behavior, some discussion is being had about
what is right to do in this situation:
http://cygwin.com/ml/cygwin/2015-05/msg00194.html
http://cygwin.com/ml/cygwin/2015-04/msg00171.html
I am of the opinion that if you "touch" a file, it should not be executable
under Cygwin unless you explicitly grant that permission via "chmod", "install",
etc. However some are not agreeing with this and we are left with the current
state. My current workaround for this is using "noacl" mounts when needed:
http://github.com/svnpenn/dotfiles/blob/b8ace36/fstab
This does have some drawbacks. noacl mounts will ignore any programs such as
"chmod" and "install" that modify permissions. Instead files are checked for a
shebang:
- "#!" in the case of Bash scripts
- ":" in the case of batch files
Even though it is already a good idea to use a shebang,
http://stackoverflow.com/q/25165808
using "noacl" forces the matter. Also using "noacl" I believe gives you less
control over permissions, as I am not sure how you would even do something like
setting read or write permissions.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list