LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-17-2011, 10:57 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,331

Rep: Reputation: 54
Why do I have to make these files world readable?


Linux permissions have always frustrated me. They are really annoying to work with and very unversatile compared to NTFS.

Here's my current situation, and I don't understand what's going on here.

I have a server with a smb share, a user on another machine is in the group that is assigned to those files. The files are chmodded 770. If the user is in that group then technically that user should have access to those files... but it does not. If I chmod to 775 then the user has access. WTF? Why? I don't care given it's a local server, but still, if I have to make files world readable for a single user to have access even though I granted those rights through the filesystem and through samba, then that's a huge security issue, and it's no wonder we're not seeing Linux used for enterprise file servers.

Another thing that pisses me off with linux permissions is when a new file is created, the permissions arn't inherited. This folder gets lot of data added to it but it defaults to whatever the default permissions are. I need to run a script to periodicly fix all the permissions. To me this is really messy.

Is there not a better way to manage this?
 
Old 03-18-2011, 06:18 AM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
If both client and server machines are Linux, BSD or Mac, you will probably have an easier time using NFS than Samba. The problem you're experiencing is probably due to the underlying Linux system and the Samba layer not recognising each other's users and groups. Usually both are kept in sync by configuring them to use LDAP as a backend. This isn't as necessary with NFS, as there are other ways of communicating user and group ids between machines (some have security implications though, so be cautious).

As for the permissions, I don't think there is a way of specifying inheritance, but there are other options. You can use umask (set e.g. via /etc/profile) to set the default permissions for a user. You can set a "create mask" in Samba, which can be configured per share. You can also set the default group of newly created files by setting the group ID on the parent directory (setgid/sgid).

If you want finer grained control like NTFS, you could try setting up ACLs. I've never used them myself though, so don't know how well they work with Samba.

Hope that helps!
 
  


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
World Readable Home Directories carlosinfl Debian 7 06-24-2008 05:48 AM
how do i make fat32 partition readable? jaan kaer Linux - Newbie 15 08-01-2006 10:59 AM
How can I make the fonts in WINE more readable? DaneM Linux - General 10 12-11-2005 06:30 AM
make a folder readable evensen Linux - Software 6 12-29-2004 06:37 AM
Make an archive readable aizkorri Programming 4 03-07-2002 11:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:56 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
Open Source Consulting | Domain Registration