Can't set current working directory into ntfs mounted directory.

Bug #1194225 reported by Eric Roy Hyatt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ntfs-3g (Ubuntu)
New
Undecided
Unassigned

Bug Description

My Xubuntu installation has an ext4 partition mounted at / and an ntfs partition mounted at /path

When I "cd /path" either as a user or as root, the system responds
"/path: Operation not permitted", and my current working directory does not change. I expected to get no error message and for the current working directory to be changed to "/path".

The critical line in /etc/fstab is
"/path ntfs-3g no_def_opts,allow_other 0 2"

My guess is that this is a bug in ntfs-3g, since I have had other linux machines (Fedora and Debian) with the same arrangement of partitions. On these other machines I have been able to set my current working directory to a directory in the NTFS partition.

Xubuntu 13.04
Package ntfs-3g 1:2013.1.13-1+0ubuntu2 0

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: ntfs-3g 1:2013.1.13-1+0ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-25.37-generic 3.8.13
Uname: Linux 3.8.0-25-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Mon Jun 24 10:31:10 2013
InstallationDate: Installed on 2013-05-17 (38 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
MarkForUpload: True
SourcePackage: ntfs-3g
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Eric Roy Hyatt (ericroyhyatt) wrote :
Revision history for this message
Eric Roy Hyatt (ericroyhyatt) wrote :

After further tests, I have isolated the problem to the "no_def_opts" option of ntfs-3g. For these tests, the NTFS partition is not mentioned in /etc/fstab. The mount point for the NFTS partition is an empty directory /net/win owned by root with permissions rwxrwxrwx With this setup, if I log in as root and mount the NTFS partition "ntfs-3g /dev/sda5 /net/win", all is OK. Logged in as root if I mount the partition "ntfs-3g -o no_def_opts /dev/sda5 /net/win" then I can "cd /net" but in response to "cd win", the system says "win: Operation not permitted". root can not cd into a directory that is owned by root!

Revision history for this message
Jean-Pierre (jean-pierre-andre) wrote :

Trying to replay your example, I got "Operation not supported", not "Operation not permitted".

The "no_def_opts" means not setting the "silent" option (and other ones), and there is some lack of documentation information on "silent" : beside ignoring errors on chmod(1) and chown(1), this also ignores errors on access(2) which is a function to check the permissions. You probably do not have defined a user mapping file, so no permission can be checked and access(2) leads to an unsupported situation which is returned to "cd".

So you have to either set the "silent" option, or "uid=0" (to request checking permissions for root), or define a user mapping file (or set the option "permissions" if you do not need to interfere with Windows).

Revision history for this message
Eric Roy Hyatt (ericroyhyatt) wrote :

Repeating my tests, I agree with Jean-Pierre: the system response is "Operation not supported" not "Operation not permitted". I wrote my report of 16 October from handwritten notes--I conclude that I transcribed the system response incorrectly.
Thanks you Mr. Andre for your suggestions regarding "silent" or "uid=0". Both allowed me past the roadblock I had described.

I conclude that most of my problem arose because I did not understand the documentation.

I am now mounting the partition in question with "permissions", which I understand defines standard permissions for the contents of the partition. If this is true, the documentation would be clearer if it explicitly said something like "standard permissions are not defined unless ..." Further, the part of the documentation that says "ACCESS HANDLING AND SECURITY/Be default, files and directories are owned by ... and everybody has full read, write, execution and directory browsing permissions." is at best deceptive, at worst completely untrue. Some of Jean-Pierre's previous comments to should be added to the documentation to improve it.

Revision history for this message
Jean-Pierre (jean-pierre-andre) wrote :

> the part of the documentation that says "ACCESS HANDLING AND SECURITY
> /Be default, files and directories are owned by ... and everybody has full read,
> write, execution and directory browsing permissions." is at best deceptive,
> at worst completely untrue.

What do you feel deceptive or untrue in this sentence ?

Your issue arose because you rejected the default options by using "no_def_opts".

Revision history for this message
Eric Roy Hyatt (ericroyhyatt) wrote :

The whole sentence is deceptive.
My issue arose because I applied "no_def_opts".
The documentation says that "no_def_opts" cancels options "silent", "allow_other", and "nonempty".
The documentation does not say that "no_def_opts" overrides the "default behavior" described in the Access Handling paragraph, conveniently described 33 paragraphs from the description of no_def_opts.
There are 5-6 other default behaviors described in the documentation. Does no_def_opts cancel all of these, for example the default behavior "relatime"?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.