Will permission bits set on a directory on an external hard drive be respected under Windows?
Clash 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.
linux permissions filesystems windows ntfs
 |Â
show 4 more comments
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.
linux permissions filesystems windows ntfs
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 frommount
. Could you be more specific?
â Tim
May 27 at 22:43
See themount.ntfs-3g(8)
man page, "Description" section, "Access Handling and Security" subsection.
â Ignacio Vazquez-Abrams
May 27 at 23:36
 |Â
show 4 more comments
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.
linux permissions filesystems windows ntfs
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.
linux permissions filesystems windows ntfs
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 frommount
. Could you be more specific?
â Tim
May 27 at 22:43
See themount.ntfs-3g(8)
man page, "Description" section, "Access Handling and Security" subsection.
â Ignacio Vazquez-Abrams
May 27 at 23:36
 |Â
show 4 more comments
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 frommount
. Could you be more specific?
â Tim
May 27 at 22:43
See themount.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
 |Â
show 4 more comments
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).
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
add a comment |Â
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).
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
add a comment |Â
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).
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
add a comment |Â
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).
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).
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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