LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2010, 07:49 AM   #1
hugo87
LQ Newbie
 
Registered: May 2009
Location: CABA, Argentina
Distribution: ArchLinux
Posts: 16

Rep: Reputation: 0
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.

Last edited by hugo87; 10-08-2010 at 07:51 AM.
 
Old 10-08-2010, 07:57 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,145
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Did you share the drive using NFS?
If so did you share it read write or read only?
 
Old 10-08-2010, 08:31 AM   #3
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
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.
 
Old 10-09-2010, 04:19 PM   #4
hugo87
LQ Newbie
 
Registered: May 2009
Location: CABA, Argentina
Distribution: ArchLinux
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 10-09-2010, 05:03 PM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 4,515
Blog Entries: 9

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
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.
 
Old 10-09-2010, 05:15 PM   #6
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
Quote:
Originally Posted by GazL View Post
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.
 
Old 10-10-2010, 01:49 AM   #7
hugo87
LQ Newbie
 
Registered: May 2009
Location: CABA, Argentina
Distribution: ArchLinux
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GazL View Post
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 View Post
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.
 
Old 10-10-2010, 04:20 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
NTFS?
 
Old 10-11-2010, 11:49 PM   #9
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
Quote:
Originally Posted by catkin View Post
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.
 
Old 10-12-2010, 12:53 AM   #10
hugo87
LQ Newbie
 
Registered: May 2009
Location: CABA, Argentina
Distribution: ArchLinux
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by joec@home View Post
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 View Post
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.
 
Old 10-12-2010, 02:24 AM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

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

777 = rwxrwxrwx
 
Old 10-12-2010, 08:41 AM   #12
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by hugo87 View Post
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.
 
Old 10-12-2010, 12:44 PM   #13
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
Quote:
Originally Posted by hugo87 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove ext3 filesystem but not it's partition ? Vilius Slackware 8 11-18-2015 12:15 PM
Set permanent permissions on Ext3 HD EarthAndAllStars Linux - Hardware 2 02-25-2009 05:22 AM
Remove journal from ext3 ilikejam Linux - General 12 03-02-2004 01:53 AM
Newbie: ext3 permissions statmobile Linux - Newbie 7 02-09-2004 01:01 PM
Cannot remove EXT3 partition. keymoo Linux - Newbie 1 05-23-2002 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration