Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba File Permissions

Status
Not open for further replies.

Packet7

IS-IT--Management
Jun 20, 2003
751
US
Hi,

I am new to Linux and trying to set permissions on a folder that I would like to copy data from on a daily basis. The Samba Server is configured and I have an account with access to the share.

Unfortunately, in order for my account to work, I have to add "Read" and "Execute" on each folder for "Others". The Owner and File Group is currently "Root".

How can I apply these permissions to the parent folder so they are pushed down to all subfolders?

Currently, the folder is "dbbackup" with a single folder called "dbbackup1". I need Windows access to all the folders and files in "dbbackup1" along with any new folders created by "root" within "dbbackup" and anything else.

Can this be done? In Windows I have used "Inherint Permissions". Thanks!

John
 
How do the files get into dbbackup folder? You can change file/folder permissions recursively by using chown -R user:group. i.e. chown -R root:john dbbackup.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Hi,

An application installed on the box performs a DB backup each night. I plan to schedule a Brightstore copy job to transfer the data over to our SAN. What does "chown -R root:john dbbackup" actually do?

Thanks for your help!

John
 
chown is used to change file & folder ownership. The -R option is used to "push" the change down through all the sub-folders and files. So, chown -R root:john dbbackup (assuming there is a group called john) will change the ownership of dbbackup folder and all the files & folders under it to belong to the user root and to the group john.

What database are you running? Maybe it could be scripted to backup straight to you SAN instead of going through an extra hoop.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Hi,

It's a Netscreen Security Manager DB that can be copied to another server. However, it uses SCP and we don't have a SCP box on the LAN. Since all our backups are done using Brightstore, I wanted to follow the standard. Regarding the "John" group, should I add the Samba user to that group?

Thanks.

Rgds,

John
 
I was thinking about the Linux machine mounting a SAN partition as a local folder and have the Netscreen Security Manager dump its DB there.

When you create a user account on Linux, by default, a private group by the same name is also created. So if you were to create a user account called john, there would also be a private group called john that is created at the same time. You could substitute john for any other group of your choice when changing ownership, just make sure that you are part of that group.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Hi,

I like that approach. However, I'm not sure how to mount a drive directly to our SAN. Any hints would be helpful.

Thanks again!
 
Hi,

The permission change worked. Unfortunately, the folder that was created after the command was issued didn't inherent the group permission. Is there a way to flag the folder so that all subfolders created inherent the permissions?

Thanks!
 
You'll need to have a sticky bit set for the group. Do a chmod 2775 dbbackup. All files & folders created after that will be "stuck" with the group of the parent folder.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top