4

My hard drive has an NTFS partition mounted under Ubuntu 12.04.

I use Evince as the default application to open PDF files downloaded under Firefox. I often save copies of PDF files opened in Evince to the NTFS partition, and before that, I would like to create new folders in the NTFS partition, for where the PDF files will be saved, by hitting "Save a Copy ..." and "Create Folder" under Evince.

Sometimes new folders in the NTFS partition could not be created using the above way in Evince, for the reason of "Error creating directory: Permission denied", and alternatively, I have to create new folders under Nautilus before I can save copies of PDF files into them under Evince. This is troublesome, because I can't create new folders and save PDF files both under Evince.

But the problem doesn't always happen, and sometimes I can be permitted to create new directories in the NTFS partition under Evince.

So I wonder why the problem happens and what I can do to solve the problem?

23
  • When the problem happens what is the output of mount?
    – Braiam
    Feb 1 '14 at 23:17
  • /dev/sda3 on /windows-d type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096). I think the output of mount doesn't matter, because I can create new folders under Nautilus when the problem happens.
    – Tim
    Feb 1 '14 at 23:19
  • Can you create new directories using "mkdir" (e.g. mkdir /windows-d/foo/)?
    – samiam
    Feb 2 '14 at 0:07
  • Yes, I can. @samlam. The problem happens under Evince.
    – Tim
    Feb 2 '14 at 0:08
  • 1
    I get the sense that "permission denied" really means something else, such as "path too long". One way to see what's going on is to use strace to run evince with a PDF file that consistently creates the problem in question, e.g. strace evince '/windows-d/users/foo/bar/file with many spaces/something that makes the file really long/and longer/and so on/Here is the problem file.pdf' > strace.output 2>&1 Then read the strace.output file.
    – samiam
    Feb 2 '14 at 0:18
2

I suspect this is an error with the NTFS driver on this system. I would make sure to use the most current version of the NTFS driver:

http://www.tuxera.com/community/ntfs-3g-download/

And see if the problem persists. If it does, here is the form for the ntfs-3g driver:

http://tuxera.com/forum/

Troubleshooting log

OK, the back and forth in the comment section has been going on for a while, so let me formulate a real answer here, albeit a currently incomplete one.

Here is how the OP (original poster) mounted the partition:

/dev/sda3 on /windows-d type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)

He can run mkdir by hand to make directories, but evince isn't able to make them. Running strace, we get this error:

mkdir("/windows-d/academic discipline/study objects/areas/formal systems/logic/generalize to when inference is uncertain/uncertainlize deductive logic/statistics/general/Ogunnaike/new", 0777) = -1 EACCES (Permission denied)

However, he can run mkdir to make the directory, so I'm scratching my head to why it's not working. So, I went to see what this does:

strace mkdir '/windows-d/academic discipline/study objects/areas/formal systems/logic/generalize to when inference is uncertain/uncertainlize deductive logic/statistics/general/Ogunnaike/new' > strace.mkdir.output 2>&1

Here's the mkdir() call in the mkdir command:

mkdir("/windows-d/academic discipline/study objects/areas/formal systems/logic/generalize to when inference is uncertain/uncertainlize deductive logic/statistics/general/Ogunnaike/new", 0777) = 0

It makes the same system-level call.

Right now I suspect it could be:

  • selinux gives evince limited permissions (To check, /etc/selinux/config to see if selinux is running and read /var/log/audit/audit.log to see if something is amiss; however the original poster [OP] is not running selinux)
  • evince runs as a different user as his 'mkdir' commands (is evince somehow SUID to run as a different user)? (nope, evince is not SUID)
  • A bug in the FUSE NTFS driver (perhaps it only fails the first time we try to make a given directory?) (I am suspecting this)

I know this isn't an answer, but the comments back and forth trying to solve this have gotten too long.

At this point, I suspect a bug in the fuse NTFS driver which causes it to intermittently fail to make directories.

1
  • Thanks! The problem persists after I updated my ntfs driver and restart .
    – Tim
    Feb 3 '14 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.