2

I have 2 OSs on my laptop: Windows 7 on its own NTFS partition and Debian Jessie on its own ext4 partition. I also have a separate NTFS partition for my data which is shared between OSs. In Debian my data partition is mounted automatically after boot using this line in /etc/fstab:

UUID=4E2831122830FA93 /media/data ntfs defaults,permissions 0 0

I need "permissions" here to be able to grant ownership of some folders and files to my user account (which doesn't have administrator's rights). Note that some time ago it was with "ntfs-3g", not "ntfs". I made this change hoping to solve the problem, but it didn't helped. So, the problem is:

When I open Windows, I do not have permissions to use any file in the folder for which I have changed permissions from root to my account in Debian. I always get "access denied". Note that my account on Windows have administrator's rights. In the properties of the folder I have troubles with, I can see that it is set to deny access for everyone. I tried to remove this setting and got "access denied" again. And I still can't access my files from Windows. I also see the setting to allow full control to "S-1-5-21-3141592653-589793238-462843383-12000". And the owner of the folder is "Account Unknown(S-1-5-21-3141592653-589793238-462843383-12000)"

I need to find a way to give the proper rights to my Windows account. How can I tell Debian that my accounts on Windows and Linux are of the same person and the two accounts are both owners?

I would be very happy to get help. Thank you in advance!

1 Answer 1

0

That permissions looks odd, since it does not appear in the manual page for mount (because the mount options usually appear in /etc/fstab without much change). The manual page documents a different set of options for ntfs:

   uid=value, gid=value and umask=value
          Set the file permission on the filesystem.  The umask  value  is
          given in octal.  By default, the files are owned by root and not
          readable by somebody else.

and of course for more general use:

   user   Allow an ordinary user to mount the filesystem.  The name of the
          mounting  user  is  written  to the mtab file (or to the private
          libmount file in /run/mount on systems without a  regular  mtab)
          so  that  this same user can unmount the filesystem again.  This
          option implies the options noexec,  nosuid,  and  nodev  (unless
          overridden   by  subsequent  options,  as  in  the  option  line
          user,exec,dev,suid).

For the Windows side, the story is different. Windows assigns all of the users (and groups and other security objects) GUIDs which Linux would not have access to unless it was talking to some application running on Windows (such as Active Directory). Presuming you're not on a Windows domain, and running the Windows machine as a workstation (off the domain), then there's no Active Directory, and the longish GUID that you're seeing is just made up. As a workstation user (and owner), you can take ownership of files and folders by following this path in the File Explorer:

  • right-click on the file, select Properties
  • select the Security tab
  • click on the Advanced button near the bottom
  • near the top, it shows the owner, and a button on the right marked Change
  • click the Change button
  • enter your account name, and click on the Check Names button.
  • if you've typed it correctly, Windows will expand that to a real machine\user name. Click OK.

Once you've acquired ownership of files, you can modify the permissions (in the original Security dialog) to take full ownership of the files.

2
  • Ok, now I am using uid and umask. But what should I do to solve my problem on Windows as it described in my post?? Commented Nov 20, 2016 at 16:05
  • Is the NTFS driver of Linux reliable enough to have a shared drive with Windows 10 which both have write access to?
    – Royi
    Commented May 13, 2018 at 4:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .