chmod broken?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

chmod broken?

Chris Sutcliffe-2
I can't get chmod to work with MSYS 1.0.12:

csutclif@EUSH000065 ~
$ uname -a
MINGW32_NT-5.1 EUSH000065 1.0.12(0.46/3/2) 2010-01-05 20:26 i686 Msys

csutclif@EUSH000065 ~
$ touch test.txt

csutclif@EUSH000065 ~
$ ls -l test.txt
-rw-r--r-- 1 csutclif Administrators 0 Feb 19 06:33 test.txt

csutclif@EUSH000065 ~
$ chmod g+w test.txt

csutclif@EUSH000065 ~
$ ls -l test.txt
-rw-r--r-- 1 csutclif Administrators 0 Feb 19 06:33 test.txt

csutclif@EUSH000065 ~
$ chmod --version
chmod (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie and Jim Meyering.

I believe I'm using the correct version of chmod:

csutclif@EUSH000065 ~
$ ls -l /bin/chmod
-rwxr-xr-x 1 csutclif Administrators 1063424 Nov  6 02:09 /bin/chmod*

Is this a known issue with MSYS?

Chris

--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: chmod broken?

Cesar Strauss-2
Chris Sutcliffe wrote:
> I can't get chmod to work with MSYS 1.0.12:

[...]

> csutclif@EUSH000065 ~
> $ chmod g+w test.txt
>
> csutclif@EUSH000065 ~
> $ ls -l test.txt
> -rw-r--r-- 1 csutclif Administrators 0 Feb 19 06:33 test.txt

It seems MSYS uses by default the equivalent of Cygwin's "noacl" mount
option:

* The Access Control List of the file is ignored.
* The read flag is always on.
* The DOS read-only attribute controls the user write flag.
* Files are considered to be executable if the filename ends with .bat,
.com or .exe, or if its content starts with #!.
* Directories have the execute flags always on.

Regards,
Cesar


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: chmod broken?

Chris Sutcliffe-2
Hi Cesar,

> It seems MSYS uses by default the equivalent of Cygwin's "noacl" mount
> option:
>
> * The Access Control List of the file is ignored.
> * The read flag is always on.
> * The DOS read-only attribute controls the user write flag.
> * Files are considered to be executable if the filename ends with .bat,
> .com or .exe, or if its content starts with #!.
> * Directories have the execute flags always on.

Hrm... good to know, thank you.

Is it possible to override the noacl mount option?

Chris

--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: chmod broken?

Charles Wilson-8
Chris Sutcliffe wrote:

>> It seems MSYS uses by default the equivalent of Cygwin's "noacl" mount
>> option:
>>
>> * The Access Control List of the file is ignored.
>> * The read flag is always on.
>> * The DOS read-only attribute controls the user write flag.
>> * Files are considered to be executable if the filename ends with .bat,
>> .com or .exe, or if its content starts with #!.
>> * Directories have the execute flags always on.
>
> Hrm... good to know, thank you.
>
> Is it possible to override the noacl mount option?

As far as I'm aware, this is considered a /feature/, not a bug. MSYS
deliberately ignores all those posixism, so that the windows access
rules control things. (E.g. the unix permission "bits" are little white
lies. Even if 'ls' says -rwxrwxrwx, if the Windows Security settings say
"no" then you can't.

But...MSYS is aimed mostly at the windows user, who is (arguably)
familiar with setting permissions on files via the windows Security
tools, but...'chmod? huh?'

--
Chuck

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: chmod broken?

Chris Sutcliffe-2
> As far as I'm aware, this is considered a /feature/, not a bug. MSYS
> deliberately ignores all those posixism, so that the windows access
> rules control things. (E.g. the unix permission "bits" are little white
> lies. Even if 'ls' says -rwxrwxrwx, if the Windows Security settings say
> "no" then you can't.

I'm running in to some odd behaviour then:

csutclif@EUSH000065 /src/vim/src
$ ls -l | grep gobj
drwxr-xr-x 2 csutclif Administrators       0 Mar  4 21:35 gobj/

csutclif@EUSH000065 /src/vim/src
$ touch gobj/test.txt
touch: cannot touch `gobj/test.txt': Permission denied

The scenario I'm in is that I'm using MSYS to create a native Windows
GVim.  During the build process gobj is created with 'mkdir -p'.  This
works fine for the user who does the initial creation of the gobj
directory, but if I log in as someone else and try to re-build GVim as
this other user, I get the 'Permission denied' error as per above.

It's odd though, since MSYS claims that this alternate user (csutclif
in this case) owns the directory.

Chris

--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: chmod broken?

Johannes Schindelin
Hi,

On Fri, 5 Mar 2010, Chris Sutcliffe wrote:

> The scenario I'm in is that I'm using MSYS to create a native Windows
> GVim.

You might be interested in this:

http://repo.or.cz/w/msysgit.git/tree/d09200075e3dcdb73effbaa9f8664b9cfdc6332d:/src/vim

Long story: in msysGit, we use GVim, to help Unix developers in a Windows
exile by providing something familiar. To compile it, we run
/src/release.sh which clones the repository, compiles, installs and
commits GVim. This assumes that you installed the msysGit environment with
the net installer, though:

http://code.google.com/p/msysgit/downloads/list

Ciao,
Johannes


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys