Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have mounted an external USB drive that is used for file shares on CentOS. All of the clients access the shares are Windows XP or 7. Within Windows, I use the "Manage your credentials" feature in "User Accounts" to allow the Windows machines to access different shares.

I recursively changed the owner, group, and permissions level to match the snippet below for the entire Sales Manager share. The credentials for the user "manager" are set in Windows "Manage your credentials" for access control. I then map the share to a network drive in Windows.

-rwxrwx--- 1 root    managers 924672 Oct 30 08:18 fileName.xls

After a member of the "managers" group opens and saves a file the permissions gets changed to the snippet below. This causes other users who are members of the "managers" group to lose the ability to write that file. In this example, I used the user manager to access a demo file. You can see how manager is now the owner and loses x. The group changes to the default group of the user accessing the file. The group also loses wx.

-rw-r--r-- 1 manager managers 919552 Oct 30 08:25 fileName.xls 

I am taking a intro class to UNIX/Linux, but it does not get into the admin side. It is geared towards the end user. My instructor advised me to do exactly what I am doing here by asking you, the gurus. Will you please help or point me in the right direction???

share|improve this question

1 Answer 1

I had this same issue. Linux Samba server settings have a create mask where you can set the default create permissions. There is a force user setting where you can force created files to always be the same user.

Settings location in ubuntu:

/etc/samba/smb.conf

If your permissions are changing even though you are just editing the file this could be because your particular editor has an "atomic save" feature. This is where the editor creates a temporary file and writes the changes to there and then replaces the temporary file with the original. This would mean that every time you modify a file you are actually deleting and creating a new file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.