Will permission bits set on a directory on an external hard drive be respected under Windows?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I have an external hard drive, which has a ntfs file system.



From output of sudo fdisk -l:



Disk /dev/sdb: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00023f15

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1953458175 1953456128 931.5G 7 HPFS/NTFS/exFAT


From output of mount:



/dev/sdb1 on /media/t/My Passport type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)


If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?



I would like to find a way to restrict access to a directory on my external hard drive from any OS (in particular, Linux and Windows). Also see https://askubuntu.com/a/104544/1471



I just found that chmod doesn't work on the external hard drive, and I wonder why and how I can do about it:



$ ls -ld temp/
drwxrwxrwx 1 t t 144 May 27 18:31 temp/
$ sudo chmod o-rwx temp
$ ls -ld temp/
drwxrwxrwx 1 t t 144 May 27 18:31 temp/


Thanks.







share|improve this question





















  • Permission bits on NTFS? How are you setting them?
    – Ignacio Vazquez-Abrams
    May 27 at 22:22










  • Updated, can I change permission bits on a directory on NTFS?
    – Tim
    May 27 at 22:35










  • There are ways to set the ACLs on a NTFS filesystem, but they can be (and usually are) ignored on mount.
    – Ignacio Vazquez-Abrams
    May 27 at 22:40










  • Thanks. Added some information from mount. Could you be more specific?
    – Tim
    May 27 at 22:43










  • See the mount.ntfs-3g(8) man page, "Description" section, "Access Handling and Security" subsection.
    – Ignacio Vazquez-Abrams
    May 27 at 23:36














up vote
1
down vote

favorite












I have an external hard drive, which has a ntfs file system.



From output of sudo fdisk -l:



Disk /dev/sdb: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00023f15

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1953458175 1953456128 931.5G 7 HPFS/NTFS/exFAT


From output of mount:



/dev/sdb1 on /media/t/My Passport type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)


If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?



I would like to find a way to restrict access to a directory on my external hard drive from any OS (in particular, Linux and Windows). Also see https://askubuntu.com/a/104544/1471



I just found that chmod doesn't work on the external hard drive, and I wonder why and how I can do about it:



$ ls -ld temp/
drwxrwxrwx 1 t t 144 May 27 18:31 temp/
$ sudo chmod o-rwx temp
$ ls -ld temp/
drwxrwxrwx 1 t t 144 May 27 18:31 temp/


Thanks.







share|improve this question





















  • Permission bits on NTFS? How are you setting them?
    – Ignacio Vazquez-Abrams
    May 27 at 22:22










  • Updated, can I change permission bits on a directory on NTFS?
    – Tim
    May 27 at 22:35










  • There are ways to set the ACLs on a NTFS filesystem, but they can be (and usually are) ignored on mount.
    – Ignacio Vazquez-Abrams
    May 27 at 22:40










  • Thanks. Added some information from mount. Could you be more specific?
    – Tim
    May 27 at 22:43










  • See the mount.ntfs-3g(8) man page, "Description" section, "Access Handling and Security" subsection.
    – Ignacio Vazquez-Abrams
    May 27 at 23:36












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have an external hard drive, which has a ntfs file system.



From output of sudo fdisk -l:



Disk /dev/sdb: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00023f15

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1953458175 1953456128 931.5G 7 HPFS/NTFS/exFAT


From output of mount:



/dev/sdb1 on /media/t/My Passport type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)


If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?



I would like to find a way to restrict access to a directory on my external hard drive from any OS (in particular, Linux and Windows). Also see https://askubuntu.com/a/104544/1471



I just found that chmod doesn't work on the external hard drive, and I wonder why and how I can do about it:



$ ls -ld temp/
drwxrwxrwx 1 t t 144 May 27 18:31 temp/
$ sudo chmod o-rwx temp
$ ls -ld temp/
drwxrwxrwx 1 t t 144 May 27 18:31 temp/


Thanks.







share|improve this question













I have an external hard drive, which has a ntfs file system.



From output of sudo fdisk -l:



Disk /dev/sdb: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00023f15

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1953458175 1953456128 931.5G 7 HPFS/NTFS/exFAT


From output of mount:



/dev/sdb1 on /media/t/My Passport type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)


If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?



I would like to find a way to restrict access to a directory on my external hard drive from any OS (in particular, Linux and Windows). Also see https://askubuntu.com/a/104544/1471



I just found that chmod doesn't work on the external hard drive, and I wonder why and how I can do about it:



$ ls -ld temp/
drwxrwxrwx 1 t t 144 May 27 18:31 temp/
$ sudo chmod o-rwx temp
$ ls -ld temp/
drwxrwxrwx 1 t t 144 May 27 18:31 temp/


Thanks.









share|improve this question












share|improve this question




share|improve this question








edited May 27 at 22:43
























asked May 27 at 22:19









Tim

22.6k61222401




22.6k61222401











  • Permission bits on NTFS? How are you setting them?
    – Ignacio Vazquez-Abrams
    May 27 at 22:22










  • Updated, can I change permission bits on a directory on NTFS?
    – Tim
    May 27 at 22:35










  • There are ways to set the ACLs on a NTFS filesystem, but they can be (and usually are) ignored on mount.
    – Ignacio Vazquez-Abrams
    May 27 at 22:40










  • Thanks. Added some information from mount. Could you be more specific?
    – Tim
    May 27 at 22:43










  • See the mount.ntfs-3g(8) man page, "Description" section, "Access Handling and Security" subsection.
    – Ignacio Vazquez-Abrams
    May 27 at 23:36
















  • Permission bits on NTFS? How are you setting them?
    – Ignacio Vazquez-Abrams
    May 27 at 22:22










  • Updated, can I change permission bits on a directory on NTFS?
    – Tim
    May 27 at 22:35










  • There are ways to set the ACLs on a NTFS filesystem, but they can be (and usually are) ignored on mount.
    – Ignacio Vazquez-Abrams
    May 27 at 22:40










  • Thanks. Added some information from mount. Could you be more specific?
    – Tim
    May 27 at 22:43










  • See the mount.ntfs-3g(8) man page, "Description" section, "Access Handling and Security" subsection.
    – Ignacio Vazquez-Abrams
    May 27 at 23:36















Permission bits on NTFS? How are you setting them?
– Ignacio Vazquez-Abrams
May 27 at 22:22




Permission bits on NTFS? How are you setting them?
– Ignacio Vazquez-Abrams
May 27 at 22:22












Updated, can I change permission bits on a directory on NTFS?
– Tim
May 27 at 22:35




Updated, can I change permission bits on a directory on NTFS?
– Tim
May 27 at 22:35












There are ways to set the ACLs on a NTFS filesystem, but they can be (and usually are) ignored on mount.
– Ignacio Vazquez-Abrams
May 27 at 22:40




There are ways to set the ACLs on a NTFS filesystem, but they can be (and usually are) ignored on mount.
– Ignacio Vazquez-Abrams
May 27 at 22:40












Thanks. Added some information from mount. Could you be more specific?
– Tim
May 27 at 22:43




Thanks. Added some information from mount. Could you be more specific?
– Tim
May 27 at 22:43












See the mount.ntfs-3g(8) man page, "Description" section, "Access Handling and Security" subsection.
– Ignacio Vazquez-Abrams
May 27 at 23:36




See the mount.ntfs-3g(8) man page, "Description" section, "Access Handling and Security" subsection.
– Ignacio Vazquez-Abrams
May 27 at 23:36










1 Answer
1






active

oldest

votes

















up vote
2
down vote














If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?




No, UNIX file permissions don't work on Windows.




I would like to find a way to restrict access to a directory on my external hard drive from any OS.




In general, every OS has its different way to set permissions, so that's not possible. You'll need to set the appropriate permissions on the files depending on which OS the filesystem is currently mounted.



Quoting from this answer:




NTFS has Windows ACEs. Unix uses "mode bits" on each file.



On NTFS, each file can have an owner, and zero or more Windows access control entries (ACEs). An ACE consists of a principal (users and groups are principals), a set of operations (Read, Write, Execute, etc.) and whether those operations are allowed or denied. Files can have many ACEs. Other objects in Windows other than files can have ACEs as well, such as registry entries, printer objects, and other things. All ACEs are taken into account when a file operation occurs. Deny takes precedence over allow. Windows ACEs support inheritance where you can set an ACE for a directory and have it automatically propagate to lower level directories.



Files in Unix have an owning user (owner) and an owning group (owner-group). There are three fixed "principals" which are owner, members of the owning group, and everyone else (a.k.a world). For each principal there are three "bits" which cover read, write, and execute abilities. (these have different meanings for directories than files, see this). These bits determine who can perform what operations. This is called the file's mode and is built into the file (there are no separate ACEs).







share|improve this answer

















  • 2




    Uhm ... Unix has POSIX/SUS ACLs. That is to say that the same thing exists, albeit with different semantics. To pretend in 2018 that Unix has just file modes is a bit negligent. The real question isn't whether both NT and Unix have ACLs but whether they can be mapped onto each other and whether a facility exists on the unixoid system in question.
    – 0xC0000022L
    May 28 at 8:15






  • 2




    @0xC0000022L There are also NFSv4 ACLs. See en.wikipedia.org/wiki/Access_control_list#Filesystem_ACLs
    – Andrew Henle
    May 28 at 14:39










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446364%2fwill-permission-bits-set-on-a-directory-on-an-external-hard-drive-be-respected-u%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote














If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?




No, UNIX file permissions don't work on Windows.




I would like to find a way to restrict access to a directory on my external hard drive from any OS.




In general, every OS has its different way to set permissions, so that's not possible. You'll need to set the appropriate permissions on the files depending on which OS the filesystem is currently mounted.



Quoting from this answer:




NTFS has Windows ACEs. Unix uses "mode bits" on each file.



On NTFS, each file can have an owner, and zero or more Windows access control entries (ACEs). An ACE consists of a principal (users and groups are principals), a set of operations (Read, Write, Execute, etc.) and whether those operations are allowed or denied. Files can have many ACEs. Other objects in Windows other than files can have ACEs as well, such as registry entries, printer objects, and other things. All ACEs are taken into account when a file operation occurs. Deny takes precedence over allow. Windows ACEs support inheritance where you can set an ACE for a directory and have it automatically propagate to lower level directories.



Files in Unix have an owning user (owner) and an owning group (owner-group). There are three fixed "principals" which are owner, members of the owning group, and everyone else (a.k.a world). For each principal there are three "bits" which cover read, write, and execute abilities. (these have different meanings for directories than files, see this). These bits determine who can perform what operations. This is called the file's mode and is built into the file (there are no separate ACEs).







share|improve this answer

















  • 2




    Uhm ... Unix has POSIX/SUS ACLs. That is to say that the same thing exists, albeit with different semantics. To pretend in 2018 that Unix has just file modes is a bit negligent. The real question isn't whether both NT and Unix have ACLs but whether they can be mapped onto each other and whether a facility exists on the unixoid system in question.
    – 0xC0000022L
    May 28 at 8:15






  • 2




    @0xC0000022L There are also NFSv4 ACLs. See en.wikipedia.org/wiki/Access_control_list#Filesystem_ACLs
    – Andrew Henle
    May 28 at 14:39














up vote
2
down vote














If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?




No, UNIX file permissions don't work on Windows.




I would like to find a way to restrict access to a directory on my external hard drive from any OS.




In general, every OS has its different way to set permissions, so that's not possible. You'll need to set the appropriate permissions on the files depending on which OS the filesystem is currently mounted.



Quoting from this answer:




NTFS has Windows ACEs. Unix uses "mode bits" on each file.



On NTFS, each file can have an owner, and zero or more Windows access control entries (ACEs). An ACE consists of a principal (users and groups are principals), a set of operations (Read, Write, Execute, etc.) and whether those operations are allowed or denied. Files can have many ACEs. Other objects in Windows other than files can have ACEs as well, such as registry entries, printer objects, and other things. All ACEs are taken into account when a file operation occurs. Deny takes precedence over allow. Windows ACEs support inheritance where you can set an ACE for a directory and have it automatically propagate to lower level directories.



Files in Unix have an owning user (owner) and an owning group (owner-group). There are three fixed "principals" which are owner, members of the owning group, and everyone else (a.k.a world). For each principal there are three "bits" which cover read, write, and execute abilities. (these have different meanings for directories than files, see this). These bits determine who can perform what operations. This is called the file's mode and is built into the file (there are no separate ACEs).







share|improve this answer

















  • 2




    Uhm ... Unix has POSIX/SUS ACLs. That is to say that the same thing exists, albeit with different semantics. To pretend in 2018 that Unix has just file modes is a bit negligent. The real question isn't whether both NT and Unix have ACLs but whether they can be mapped onto each other and whether a facility exists on the unixoid system in question.
    – 0xC0000022L
    May 28 at 8:15






  • 2




    @0xC0000022L There are also NFSv4 ACLs. See en.wikipedia.org/wiki/Access_control_list#Filesystem_ACLs
    – Andrew Henle
    May 28 at 14:39












up vote
2
down vote










up vote
2
down vote










If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?




No, UNIX file permissions don't work on Windows.




I would like to find a way to restrict access to a directory on my external hard drive from any OS.




In general, every OS has its different way to set permissions, so that's not possible. You'll need to set the appropriate permissions on the files depending on which OS the filesystem is currently mounted.



Quoting from this answer:




NTFS has Windows ACEs. Unix uses "mode bits" on each file.



On NTFS, each file can have an owner, and zero or more Windows access control entries (ACEs). An ACE consists of a principal (users and groups are principals), a set of operations (Read, Write, Execute, etc.) and whether those operations are allowed or denied. Files can have many ACEs. Other objects in Windows other than files can have ACEs as well, such as registry entries, printer objects, and other things. All ACEs are taken into account when a file operation occurs. Deny takes precedence over allow. Windows ACEs support inheritance where you can set an ACE for a directory and have it automatically propagate to lower level directories.



Files in Unix have an owning user (owner) and an owning group (owner-group). There are three fixed "principals" which are owner, members of the owning group, and everyone else (a.k.a world). For each principal there are three "bits" which cover read, write, and execute abilities. (these have different meanings for directories than files, see this). These bits determine who can perform what operations. This is called the file's mode and is built into the file (there are no separate ACEs).







share|improve this answer














If I set some permission bits on a directory in the file system , for example to be executable and readable and writable only by root, will the permission bits be respected when I plug the external hard drive to a Windows system?




No, UNIX file permissions don't work on Windows.




I would like to find a way to restrict access to a directory on my external hard drive from any OS.




In general, every OS has its different way to set permissions, so that's not possible. You'll need to set the appropriate permissions on the files depending on which OS the filesystem is currently mounted.



Quoting from this answer:




NTFS has Windows ACEs. Unix uses "mode bits" on each file.



On NTFS, each file can have an owner, and zero or more Windows access control entries (ACEs). An ACE consists of a principal (users and groups are principals), a set of operations (Read, Write, Execute, etc.) and whether those operations are allowed or denied. Files can have many ACEs. Other objects in Windows other than files can have ACEs as well, such as registry entries, printer objects, and other things. All ACEs are taken into account when a file operation occurs. Deny takes precedence over allow. Windows ACEs support inheritance where you can set an ACE for a directory and have it automatically propagate to lower level directories.



Files in Unix have an owning user (owner) and an owning group (owner-group). There are three fixed "principals" which are owner, members of the owning group, and everyone else (a.k.a world). For each principal there are three "bits" which cover read, write, and execute abilities. (these have different meanings for directories than files, see this). These bits determine who can perform what operations. This is called the file's mode and is built into the file (there are no separate ACEs).








share|improve this answer













share|improve this answer



share|improve this answer











answered May 28 at 7:53









dr01

15.2k114667




15.2k114667







  • 2




    Uhm ... Unix has POSIX/SUS ACLs. That is to say that the same thing exists, albeit with different semantics. To pretend in 2018 that Unix has just file modes is a bit negligent. The real question isn't whether both NT and Unix have ACLs but whether they can be mapped onto each other and whether a facility exists on the unixoid system in question.
    – 0xC0000022L
    May 28 at 8:15






  • 2




    @0xC0000022L There are also NFSv4 ACLs. See en.wikipedia.org/wiki/Access_control_list#Filesystem_ACLs
    – Andrew Henle
    May 28 at 14:39












  • 2




    Uhm ... Unix has POSIX/SUS ACLs. That is to say that the same thing exists, albeit with different semantics. To pretend in 2018 that Unix has just file modes is a bit negligent. The real question isn't whether both NT and Unix have ACLs but whether they can be mapped onto each other and whether a facility exists on the unixoid system in question.
    – 0xC0000022L
    May 28 at 8:15






  • 2




    @0xC0000022L There are also NFSv4 ACLs. See en.wikipedia.org/wiki/Access_control_list#Filesystem_ACLs
    – Andrew Henle
    May 28 at 14:39







2




2




Uhm ... Unix has POSIX/SUS ACLs. That is to say that the same thing exists, albeit with different semantics. To pretend in 2018 that Unix has just file modes is a bit negligent. The real question isn't whether both NT and Unix have ACLs but whether they can be mapped onto each other and whether a facility exists on the unixoid system in question.
– 0xC0000022L
May 28 at 8:15




Uhm ... Unix has POSIX/SUS ACLs. That is to say that the same thing exists, albeit with different semantics. To pretend in 2018 that Unix has just file modes is a bit negligent. The real question isn't whether both NT and Unix have ACLs but whether they can be mapped onto each other and whether a facility exists on the unixoid system in question.
– 0xC0000022L
May 28 at 8:15




2




2




@0xC0000022L There are also NFSv4 ACLs. See en.wikipedia.org/wiki/Access_control_list#Filesystem_ACLs
– Andrew Henle
May 28 at 14:39




@0xC0000022L There are also NFSv4 ACLs. See en.wikipedia.org/wiki/Access_control_list#Filesystem_ACLs
– Andrew Henle
May 28 at 14:39












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446364%2fwill-permission-bits-set-on-a-directory-on-an-external-hard-drive-be-respected-u%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay