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 03-07-2004, 08:13 PM   #1
PAB
Member
 
Registered: Jun 2003
Posts: 44

Rep: Reputation: 15
recursive file permissions does not change new files in same directory


I am at the state where I am getting a bit more knowledgeable about Linux, but there are always some (seemingly) easy questions that I cannot find answers to. Therefore, I still consider myself very much a newbie.

I have a samba server with a number of different users. i have set them up within different groups, and granted some of the groups access to some of the directories.

I am trying to make it so that when a new file is created within a directory, it automatically obtains the file permission status of the directory itself. I would think this is how it would occur automatically, but it doesn't seem to work that way on my server.

This is how I am currently doing it:
In order to grant file read, write, and execute permissions to the owner and group, I first change the group name and owner name, recursively, for the directory:

chown "owner name" -R "directory name"
chgrp "group name" -R "directory name"

then, I change the file permissions, recursively, for the directory:

chmod 770 -R "Directory Name"

I think I am doing this correctly, but at times, when new files are added to the directory, the owner and group names are different for the file, and the permissions look like they are reset to default for this file.

Any suggestions? Thanks.

PAB
 
Old 03-07-2004, 08:27 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
You'll want to set-up Samba with defaults for the permissions for the shared directories. Of course, I don't remember how to do this off the top of my head. I think it's "create mask" or some-such, and is set in the [share] description.
 
Old 03-08-2004, 12:27 PM   #3
PAB
Member
 
Registered: Jun 2003
Posts: 44

Original Poster
Rep: Reputation: 15
thanks a lot. i looked under mask in my samba book and found exactly what i am looking for. it helps to know the terminology!

pab
 
  


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
Changing file permissions within a directory for all files. cajunaggie Linux - Newbie 2 02-06-2005 01:53 AM
rox + recursive permission change for FILES only? NonSumPisces Linux - Newbie 9 08-11-2004 07:21 PM
can't change directory permissions walterbyrd Debian 7 07-24-2004 01:20 PM
How to do recursive file copy of directory for specific files? Arodef Linux - Newbie 4 06-29-2004 05:35 PM
recursive change of permissions Meta42 Linux - Newbie 8 03-27-2004 04:41 PM

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

All times are GMT -5. The time now is 08:04 PM.

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