Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

umask equivalent for ext2/ext3 filesystems

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
tom_bxl
n00b
n00b
User avatar
Posts: 47
Joined: Wed Sep 08, 2004 1:16 pm
Location: Brussels

umask equivalent for ext2/ext3 filesystems

  • Quote

Post by tom_bxl » Mon Apr 09, 2007 8:10 am

Hi,

I would like to set a default umask to something like 220 on ext2 and ext3 file systems. Looking at the man page for mount, I could only find these options for several file system types but not on ext2/3. Is this possible and how?

Thanks,

Tom
Top
suicidal_orange_II
Apprentice
Apprentice
Posts: 299
Joined: Sat Sep 04, 2004 11:39 am

  • Quote

Post by suicidal_orange_II » Mon Apr 09, 2007 1:49 pm

I'm not 100% sure on this but I think the root of the partition takes on the permission of the folder it's mounted to. Are you trying to make it that no files on the partition can be executed? You can do that by

Code: Select all

mount -o noexec /dev/whatever /wherever
or by adding it to your fstab.

Hope I didn't totally misunderstand what you wanted :)

Suicidal_Orange
Top
tom_bxl
n00b
n00b
User avatar
Posts: 47
Joined: Wed Sep 08, 2004 1:16 pm
Location: Brussels

  • Quote

Post by tom_bxl » Mon Apr 09, 2007 6:26 pm

Thanks for the try :D ; but it does not seem to work. I have tried to change the permissions to 770 on the mount point before mounting it, but after I mounted the file system on it, the permissions were changed to 755.

In a shameless attempt, I also tried to set the default permissions to 770 changing the udev rules on the device /dev/sdax and I got the same result after mounting the file system.

Thanks anyway for the answer.

Tom
Top
tom_bxl
n00b
n00b
User avatar
Posts: 47
Joined: Wed Sep 08, 2004 1:16 pm
Location: Brussels

  • Quote

Post by tom_bxl » Mon Apr 09, 2007 6:32 pm

Btw, if my first post was not clear. I'm using the option grpid to force any file/directory created to inherit the group from its parent directory (which works fine), but I now would like to manage the default permissions (currently similar to using a umask 022) to umask 002.

Tom
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Mon Apr 09, 2007 6:50 pm

I don't think the functionality exists because of the fact that mode bits can be changed on a per-file basis unlike msdos filesystems, which doesn't have the capability...

What specifically are you trying to do? Is this a hotplug disk?

Are you trying to use this as a workgroup disk?

You could try just chmod -R to fix all the permissions, set the setgid bit to prevent further group write issues, make sure all the group owners are correct, and make sure everyone's .profile contains the correct umask default...

Another possibility is to go beyond ugo and use the newer ACL system?

You don't want to change the permissions on the /dev/sdXX device file, that should only be readable/writeable by root.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
tom_bxl
n00b
n00b
User avatar
Posts: 47
Joined: Wed Sep 08, 2004 1:16 pm
Location: Brussels

  • Quote

Post by tom_bxl » Tue Apr 10, 2007 12:01 pm

eccerr0r wrote:I don't think the functionality exists because of the fact that mode bits can be changed on a per-file basis unlike msdos filesystems, which doesn't have the capability...
Makes sense :oops:
eccerr0r wrote: What specifically are you trying to do? Is this a hotplug disk?

Are you trying to use this as a workgroup disk?
The disk is a normal hard drive. I'm indeed trying to share a directory and all sub-dirs/files between several users on the same PC. No need for network access. All files under this directory should have read/write access to all users belonging to a given group. I would like this by default so users would not have to manually change perimisisons each time they create a file.
eccerr0r wrote: You could try just chmod -R to fix all the permissions, set the setgid bit to prevent further group write issues, make sure all the group owners are correct, and make sure everyone's .profile contains the correct umask default...
I don't really like this option. If I'm not mistaken, forcing the umask in everyone's profile will change the default permissions for every file newly created. I just want to limit this behavior to a filesystem.

eccerr0r wrote: Another possibility is to go beyond ugo and use the newer ACL system?
I'll give a look to ACL
eccerr0r wrote: You don't want to change the permissions on the /dev/sdXX device file, that should only be readable/writeable by root.
Good point, I have reverted back the changes, this was just for testing.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic