This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: File permissions different inside and outside cygwin root
- From: Steven Penny <svnpenn at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 21 May 2015 20:20:48 -0500
- Subject: Re: File permissions different inside and outside cygwin root
- Authentication-results: sourceware.org; auth=none
- References: <22C6A8A4889F0C45B71BF3272671822E8209DB87 at SVNSBIOMBX02 dot ENT dot dfo-mpo dot ca>
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