LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Remove permissions from ext3 (https://www.linuxquestions.org/questions/linux-newbie-8/remove-permissions-from-ext3-836932/)

hugo87 10-08-2010 06:49 AM

Remove permissions from ext3
 
I use an external hard drive for storing lots of files I share with friends and family.

I know I can set 666, but I can only do this in contained files and directories, NOT on the actual disk root. This means people can't write to the disk root.

Also, setting 666 might cause some issues when someone else pastes files and applies some other permissions.

Is there some way to remove permissions completely from an ext3 filesystem? I mean, have the entire "permissions" layer removed? Otherwise, what can I do?

Changing fstab is out of the question, this is a shared EXTERNAL disk; people use it on their computers, I can't go around changing their fstab.
The same goes to mount parameters.

[edit] Ok, I said ext3, but it's actually ext4. I don't see any difference in this case anyway, but just in case.

prayag_pjs 10-08-2010 06:57 AM

Did you share the drive using NFS?
If so did you share it read write or read only?

alli_yas 10-08-2010 07:31 AM

Quote:

I know I can set 666, but I can only do this in contained files and directories, NOT on the actual disk root. This means people can't write to the disk root.
I think the previous poster raises a valid question - what kind of share have you exposed and what permissions have you set on the share?

Your issue is related to your share configuration. Provide more information and perhaps we can help you.

hugo87 10-09-2010 03:19 PM

It's and EXTERNAL shared drive.
I share it by taking it to their home or giving it to them, physically.
It's not a network share.

GazL 10-09-2010 04:03 PM

To do this sort of stuff successfully you really need to coordinate your users/groups across all the machines that this external filesystem will be connected to. I'm not aware of any way to disable or override the posix permissions in the same way you can do when mounting FAT based filesystems by using the UID=,GID= mount options.


You can set permissions on the root of the filesystem. Just chmod the mountpoint while the filesystem is mounted and it will set the permissions on the root directory within that filesystem.

chmod 1777 tends to work quite well in this sort of scenario. It'll work just like the /tmp directory does. Everyone will be able to create their own files but not delete anyone else's files. You'll still need to worry about uid/gid collisions though.

joec@home 10-09-2010 04:15 PM

Quote:

Originally Posted by GazL (Post 4122426)
To do this sort of stuff successfully you really need to coordinate your users/groups across all the machines that this external filesystem will be connected to. I'm not aware of any way to disable or override the posix permissions in the same way you can do when mounting FAT based filesystems by using the UID=,GID= mount options.

Unless there is reason for security, I would just use FAT32 partitions. However depending on the size of the drive you may end up needing to break it up into smaller partitions.

hugo87 10-10-2010 12:49 AM

Quote:

Originally Posted by GazL (Post 4122426)
You can set permissions on the root of the filesystem. Just chmod the mountpoint while the filesystem is mounted and it will set the permissions on the root directory within that filesystem.

chmod 1777 tends to work quite well in this sort of scenario. It'll work just like the /tmp directory does. Everyone will be able to create their own files but not delete anyone else's files. You'll still need to worry about uid/gid collisions though.

Thanks, I didn't know this. Will try :-)




Quote:

Originally Posted by joec@home (Post 4122433)
Unless there is reason for security, I would just use FAT32 partitions. However depending on the size of the drive you may end up needing to break it up into smaller partitions.

Security reasons? The initial question was how to REMOVE permissions from the filesystem altogether :-)
Regrettably, FAT is of no use, since it has an extremely low filesize limit (~4GiB), which does not suit my needs. Otherwise, it would have been my first choice.

catkin 10-10-2010 03:20 AM

NTFS?

joec@home 10-11-2010 10:49 PM

Quote:

Originally Posted by catkin (Post 4122718)
NTFS?

Actually not a bad idea, bust be careful not to let Linux setup file permissions. While "Windows" can not understand Linux file permissions, the NT Kernel can, and NTFS will respond to change requests. Can do very well with this, or cause even more problems. Possibly something to experiment with.

hugo87 10-11-2010 11:53 PM

Quote:

Originally Posted by joec@home (Post 4124524)
Actually not a bad idea, bust be careful not to let Linux setup file permissions. While "Windows" can not understand Linux file permissions, the NT Kernel can, and NTFS will respond to change requests. Can do very well with this, or cause even more problems. Possibly something to experiment with.

I thought NTFS support was still a bit unstable in general. I only just found out that mkfs.ntfs even exists :-)

I didn't understand the bit on "NT Kernel", etc. It sounds like there's bound to be some issue here anyway.


I'd rather use a documented filesystem instead of a closed one. But if there's no choice, then I'll use one.


Quote:

Originally Posted by GazL (Post 4122426)
chmod 1777 tends to work quite well in this sort of scenario. It'll work just like the /tmp directory does. Everyone will be able to create their own files but not delete anyone else's files. You'll still need to worry about uid/gid collisions though.


I actually need everyone to have read/write access to the entire disk, not just what they pasted in.
I read a bit more on the first digit of chmod, but this is not doable.

chrism01 10-12-2010 01:24 AM

1777 should be fine, unless you want(!) everyone to be able to delete anyone elses dirs/files.

777 = rwxrwxrwx

MTK358 10-12-2010 07:41 AM

Quote:

Originally Posted by hugo87 (Post 4124558)
I didn't understand the bit on "NT Kernel", etc.

AFAIK the NT Kernel is to Windows as the Linux Kernel is to a GNU/Linux distro.

joec@home 10-12-2010 11:44 AM

Quote:

Originally Posted by hugo87 (Post 4124558)
I didn't understand the bit on "NT Kernel", etc. It sounds like there's bound to be some issue here anyway.

If you take a close look at Windows NT and newer, it is a Linux / Unix server operating on PIDs 1, 2 and 3. Refereed to as the Kernel, it has a bit more but is one of those almost undocumented black boxes. On top of that is a single instance of a virtual server environment, that is the "Windows" we are familiar with. As Windows does not have coding to understand Unix style file permissions it does not know how to manage them. However the Kernel does recognize and obey Unix permissions. So for example if you hook to a NTFS partition from Linux and chmmod 000 C:\Windows on an NTFS partition, you have just successfully made a paperweight.


All times are GMT -5. The time now is 10:21 PM.