GNU bug report logs - #10735
chmod +x file

Previous Next

Package: coreutils;

Reported by: francky.leyn <at> telenet.be

Date: Mon, 6 Feb 2012 14:25:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10735 in the body.
You can then email your comments to 10735 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Mon, 06 Feb 2012 14:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to francky.leyn <at> telenet.be:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 06 Feb 2012 14:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: francky.leyn <at> telenet.be
To: "bug-coreutils " <bug-coreutils <at> gnu.org>
Cc: Francky Leyn <francky <at> leyn.eu>
Subject: chmod +x file
Date: Mon, 06 Feb 2012 15:23:33 +0100 (CET)
[Message part 1 (text/plain, inline)]
Hello, 

I perform the following: 

ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ ls -l doc/filters_for_this_document 
-rwx------ 1 ubuntu ubuntu 98 2012-02-06 14:47 doc/filters_for_this_document 
ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ whoami 
ubuntu 
ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ chmod +x doc/filters_for_this_document 
chmod: changing permissions of `doc/filters_for_this_document': Operation not supported 
ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ chmod --version 
chmod (GNU coreutils) 8.5 


On another machine I have version 6.10, and there I don't get 
the error "Operation not supported". 

What is wrong here? 

Best regards, 

Francky Leyn 
[Message part 2 (text/html, inline)]

Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Mon, 06 Feb 2012 14:35:02 GMT) Full text and rfc822 format available.

Notification sent to francky.leyn <at> telenet.be:
bug acknowledged by developer. (Mon, 06 Feb 2012 14:35:02 GMT) Full text and rfc822 format available.

Message #10 received at 10735-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: francky.leyn <at> telenet.be
Cc: 10735-done <at> debbugs.gnu.org, Francky Leyn <francky <at> leyn.eu>
Subject: Re: bug#10735: chmod +x file
Date: Mon, 06 Feb 2012 14:33:20 +0000
tags 10735 notabug

On 02/06/2012 02:23 PM, francky.leyn <at> telenet.be wrote:
> 
> Hello, 
> 
> I perform the following: 
> 
> ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ ls -l doc/filters_for_this_document 
> -rwx------ 1 ubuntu ubuntu 98 2012-02-06 14:47 doc/filters_for_this_document 
> ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ whoami 
> ubuntu 
> ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ chmod +x doc/filters_for_this_document 
> chmod: changing permissions of `doc/filters_for_this_document': Operation not supported 
> ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ chmod --version 
> chmod (GNU coreutils) 8.5 
> 
> 
> On another machine I have version 6.10, and there I don't get 
> the error "Operation not supported". 
> 
> What is wrong here? 

That's a file system presented by gvfs-fuse-daemon,
and it's telling you it doesn't support that operation.
I'm closing this as a chmod issue so.

cheers,
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Mon, 06 Feb 2012 17:25:01 GMT) Full text and rfc822 format available.

Message #13 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: Francky Leyn <francky <at> leyn.eu>, 10735 <at> debbugs.gnu.org
Subject: Re: bug#10735: chmod +x file
Date: Mon, 6 Feb 2012 10:24:04 -0700
Pádraig Brady wrote:
> francky.leyn <at> telenet.be wrote:
> > ubuntu <at> ubuntu-VirtualBox:~/.gvfs/account on stockholm/Documents/03 professional/structured_documentation$ chmod +x doc/filters_for_this_document 
> > chmod: changing permissions of `doc/filters_for_this_document': Operation not supported 
> 
> That's a file system presented by gvfs-fuse-daemon,
> and it's telling you it doesn't support that operation.
> I'm closing this as a chmod issue so.

To provide a little more explanation let me add for Francky that fuse
filesystems are hacks to make something appear as a filesystem.  They
mostly work okay.  But they often do not implement everything that is
needed by a real filesystem.  I am only familiar with sshfs fuse
filesystem and it is missing a number of important interfaces, but can
read and write files okay so I still use it in spite of deficiencies.

Since chmod is detecting an error then it must report it.

Since I see VirtualBox in the hostname I can imagine this is either an
MS or Mac machine running VirtualBox with an installation of Ubuntu
and with a fuse map back to an underlying FAT or NTFS filesystem and
the underlying filesystem does not support Unix file mode bits.  But
that doesn't really matter.  The point is that the entire chain must
support the operation or there will be an error.  The chmod command
is just the messenger reporting this to you. 

If you access those files through a "real" Unix-like filesystem then
you won't get that error.

Bob




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Mon, 06 Feb 2012 20:35:02 GMT) Full text and rfc822 format available.

Message #16 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: francky.leyn <at> telenet.be
Cc: 10735 <at> debbugs.gnu.org
Subject: Re: chmod +x
Date: Mon, 6 Feb 2012 13:33:57 -0700
Francky Leyn wrote:
> Dear Bob, 
> 
> thanks for your intervention. 
> The problem is a lot clearer to me right now. 
> 
> It is indead a Virtual Box on top of Windows 7 with an NTFS system 
> and the Linux virtual box is Ubuntu 11.04. 

NTFS doesn't have any concept of the same file modes as a Unix-like
filesystem.  Therefore any adaption layer sitting between an NTFS
layer and a Unix filesystem layer can only make compromises.  It can't
do what it can't do.  For example, where would it store this
information?  What would NTFS do with it?

> My conclusion is the following: if I want to execute chmod +x properly, 
> I need an ext (4?) partition on my machine, separated from the Windows 7 
> NTFS system. Correct? 

Yes.  It doesn't need to be ext2, ext3, ext4.  It could be any POSIX
compliant filesystem.  That would include xfs, jfs, for example along
with many others.

If the files are stored on NTFS then NTFS can't do it.  If you want
Unix filesystem semantics then it must be on a unix filessystem.  For
example on the VirtualBox filesystem.  If you chmod files in /tmp in
the virtual machine everything works fine because that is using a real
unix filesystem.

I am sure that you thought that disk space was disk space and that you
would store files on the host NTFS and reach into them using a fuse
mount layer from the virtual machine.  That works up to a point.  The
data in the file is the same data in the file.  But you wanted to
chmod the permission bits and those are not understood by NTFS.

Bob




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Mon, 06 Feb 2012 21:36:01 GMT) Full text and rfc822 format available.

Message #19 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: francky.leyn <at> telenet.be, 10735 <at> debbugs.gnu.org
Subject: Re: chmod +x
Date: Mon, 6 Feb 2012 14:34:47 -0700
francky.leyn <at> telenet.be wrote:
> some more questions.
> I abstract a file system as something where each dir/file has a header
> where all properties reside.

Yes.  This information is stored in the Inode.  You can read about it here.

  http://en.wikipedia.org/wiki/Inode

> There doesn't exist a hybrid file system that unites eg. NTFS and ext4?

No.  Not as far as I know.

> NTFS is not POSIX complient?

No.  At least as far as I know.  Others will know.  I don't use NTFS.
In any case it would need to support Unix filesystem permissions along
with user and group ownership and the full set of behavior.

Until recently it was only possible to reliably read from NTFS because
the necessary information for it wasn't reverse engineered yet.
Recently this has been completed and it is now possible to write to
NTFS.  Given how it came about it is amazing that it works at all.

Bob




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Mon, 06 Feb 2012 23:07:02 GMT) Full text and rfc822 format available.

Message #22 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: francky.leyn <at> telenet.be
Cc: 10735 <at> debbugs.gnu.org
Subject: Re: bug#10735: chmod +x
Date: Mon, 6 Feb 2012 18:05:35 -0500 (GMT+5)
Bob Proulx writes:
> 
> francky.leyn <at> telenet.be wrote:
> 
> > There doesn't exist a hybrid file system that unites eg. NTFS and ext4?
> 
> No.  Not as far as I know.

In the old days there was UMSDOS.

A modern equivalent of UMSDOS is POSIX Overlay Filesystem (posixovl). It
works in FUSE. http://sourceforge.net/projects/posixovl/

-- 
Alan Curry




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Tue, 07 Feb 2012 13:51:01 GMT) Full text and rfc822 format available.

Message #25 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: francky.leyn <at> telenet.be
To: 10735 <at> debbugs.gnu.org, Bob Proulx <bob <at> proulx.com>
Cc: Francky Leyn <francky <at> leyn.eu>
Subject: Re: chmod +x
Date: Tue, 07 Feb 2012 14:49:26 +0100 (CET)
Dear Bob,

is there any way I could suppress the warning given by chmod +x?

Best regards,

FRancky


----- Oorspronkelijk e-mail -----
> francky.leyn <at> telenet.be wrote:
> > some more questions.
> > I abstract a file system as something where each dir/file has a
> > header
> > where all properties reside.
> 
> Yes.  This information is stored in the Inode.  You can read about it
> here.
> 
>   http://en.wikipedia.org/wiki/Inode
> 
> > There doesn't exist a hybrid file system that unites eg. NTFS and
> > ext4?
> 
> No.  Not as far as I know.
> 
> > NTFS is not POSIX complient?
> 
> No.  At least as far as I know.  Others will know.  I don't use NTFS.
> In any case it would need to support Unix filesystem permissions
> along
> with user and group ownership and the full set of behavior.
> 
> Until recently it was only possible to reliably read from NTFS
> because
> the necessary information for it wasn't reverse engineered yet.
> Recently this has been completed and it is now possible to write to
> NTFS.  Given how it came about it is amazing that it works at all.
> 
> Bob
> 




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Tue, 07 Feb 2012 15:53:02 GMT) Full text and rfc822 format available.

Message #28 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: francky.leyn <at> telenet.be
Cc: 10735 <at> debbugs.gnu.org, Francky Leyn <francky <at> leyn.eu>,
	Bob Proulx <bob <at> proulx.com>
Subject: Re: bug#10735: chmod +x
Date: Tue, 07 Feb 2012 07:51:23 -0800
On 02/07/2012 05:49 AM, francky.leyn <at> telenet.be wrote:
> is there any way I could suppress the warning given by chmod +x?

You can suppress all warnings with the shell command:

chmod +x file 2>/dev/null;:

This is usually not a good idea.  The warnings are there
for a reason.




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Tue, 07 Feb 2012 16:01:01 GMT) Full text and rfc822 format available.

Message #31 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: francky.leyn <at> telenet.be
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 10735 <at> debbugs.gnu.org, Francky Leyn <francky <at> leyn.eu>,
	Bob Proulx <bob <at> proulx.com>
Subject: Re: bug#10735: chmod +x
Date: Tue, 07 Feb 2012 16:59:38 +0100 (CET)
Dear Paul,

thanks for your reply, but this was not what I meant.

I have scripts that work fine on a full Linux platform (ext filesystem).
However, if I use those scipts (that use chmod +x), I get a lot of warnings.
Thing I dislike to see, and are confusing.

I was wondering wether I couldn't write something like

if [not on NTFS filesystem] then
  chmod +x

or

[on NTFS filesystem] || chmod +x ...

Best regards,

Francky


----- Oorspronkelijk e-mail -----
> On 02/07/2012 05:49 AM, francky.leyn <at> telenet.be wrote:
> > is there any way I could suppress the warning given by chmod +x?
> 
> You can suppress all warnings with the shell command:
> 
> chmod +x file 2>/dev/null;:
> 
> This is usually not a good idea.  The warnings are there
> for a reason.
> 




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Tue, 07 Feb 2012 21:32:01 GMT) Full text and rfc822 format available.

Message #34 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: francky.leyn <at> telenet.be
Cc: 10735 <at> debbugs.gnu.org, Francky Leyn <francky <at> leyn.eu>,
	Bob Proulx <bob <at> proulx.com>
Subject: Re: bug#10735: chmod +x
Date: Tue, 07 Feb 2012 13:30:22 -0800
On 02/07/2012 07:59 AM, francky.leyn <at> telenet.be wrote:
> I was wondering wether I couldn't write something like
> 
> if [not on NTFS filesystem] then
>   chmod +x

No doubt you can write something like that.
I don't use NTFS, so I'm not a good source of advice
about the details.




Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Tue, 07 Feb 2012 22:29:02 GMT) Full text and rfc822 format available.

Message #37 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 10735 <at> debbugs.gnu.org, Francky Leyn <francky <at> leyn.eu>,
	Bob Proulx <bob <at> proulx.com>, francky.leyn <at> telenet.be
Subject: Re: bug#10735: chmod +x
Date: Tue, 07 Feb 2012 14:51:40 -0700
[Message part 1 (text/plain, inline)]
On 02/07/2012 02:30 PM, Paul Eggert wrote:
> On 02/07/2012 07:59 AM, francky.leyn <at> telenet.be wrote:
>> I was wondering wether I couldn't write something like
>>
>> if [not on NTFS filesystem] then
>>   chmod +x
> 
> No doubt you can write something like that.
> I don't use NTFS, so I'm not a good source of advice
> about the details.

And if you listen to the advice from autoconf, it would be better to do
things like:

probe whether chmod +x 2>/dev/null makes a difference on a dummy file
based on that probe, control whether to skip all other chmod +x

by rewriting things as a feature-based probe (does chmod +x work or spit
out noise), rather than a name-based probe (am I on NTFS), your script
will be more portable to other file systems that share NTFS
shortcomings, as well as automatically start using chmod +x if the
kernel folks later figure out a way to make NTFS fake chmod +x in a
reasonable manner.

-- 
Eric Blake   eblake <at> redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#10735; Package coreutils. (Fri, 10 Feb 2012 10:44:02 GMT) Full text and rfc822 format available.

Message #40 received at 10735 <at> debbugs.gnu.org (full text, mbox):

From: francky.leyn <at> telenet.be
To: Eric Blake <eblake <at> redhat.com>
Cc: 10735 <at> debbugs.gnu.org, Francky Leyn <francky <at> leyn.eu>,
	Bob Proulx <bob <at> proulx.com>, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#10735: chmod +x
Date: Fri, 10 Feb 2012 11:42:36 +0100 (CET)

----- Oorspronkelijk e-mail -----
> On 02/07/2012 02:30 PM, Paul Eggert wrote:
> > On 02/07/2012 07:59 AM, francky.leyn <at> telenet.be wrote:
> >> I was wondering wether I couldn't write something like
> >>
> >> if [not on NTFS filesystem] then
> >>   chmod +x
> > 
> > No doubt you can write something like that.
> > I don't use NTFS, so I'm not a good source of advice
> > about the details.
> 
> And if you listen to the advice from autoconf, it would be better to
> do
> things like:
> 
> probe whether chmod +x 2>/dev/null makes a difference on a dummy file
> based on that probe, control whether to skip all other chmod +x
> 
> by rewriting things as a feature-based probe (does chmod +x work or
> spit
> out noise), rather than a name-based probe (am I on NTFS), your
> script
> will be more portable to other file systems that share NTFS
> shortcomings, as well as automatically start using chmod +x if the
> kernel folks later figure out a way to make NTFS fake chmod +x in a
> reasonable manner.

This is an very usefull hint.
Do you perhaps have a snippet of bash code for it?

Best regards,

Francky

> --
> Eric Blake   eblake <at> redhat.com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 
> 




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 Mar 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.