How to set multiple ownership permission on a file/directory?


 
Thread Tools Search this Thread
Operating Systems Solaris How to set multiple ownership permission on a file/directory?
# 1  
Old 08-22-2016
Oracle How to set multiple ownership permission on a file/directory?

Hi,

Any ideas to set multiple ownership permission on a file/directory on Solaris? I need a folder to have multiple ownership on the 2 nodes servers. The 2 nodes servers require to mount a SMBFS with different user ID. Please assist. Thanks.
# 2  
Old 08-22-2016
Hi freshmeat,

Am I correct when I say this is a Cluster, if it is can you give us some more info on the configs.

I'm not sure that you'd be able to mount this up with two unique UID's, as when the service fails over all the existing connections will be lost - the good thing is that the half that couldn't work will now be working.

I's possibly a little messy, but it would be better to use the group access for the fail over service.

Regards

Gull04
# 3  
Old 08-22-2016
As far as I am aware, there is no multiple ownership. Each 'file' has one owner & one group associated with it. These are stored as the UID number & GID number from /etc/passwd & /etc/group respectively. If the 'file' is shared between servers and the names associated to the UID & GID do not match the it can be very confusing. Normal file permissions also include the global/other/world permissions.

You can, however. look at something called Access Control List (ACL) for each 'file' Within them, you can define more individual accounts or groups to have specific access, but there is still only one true owner.

Have a read of this manual page to see if it helps.


I've used 'file' to refer to any object in the directory tree including files, directories, pipe, fifo, devices etc.


Kind regards,
Robin
# 4  
Old 08-23-2016
Quote:
Originally Posted by gull04
Hi freshmeat,

Am I correct when I say this is a Cluster, if it is can you give us some more info on the configs.

I'm not sure that you'd be able to mount this up with two unique UID's, as when the service fails over all the existing connections will be lost - the good thing is that the half that couldn't work will now be working.

I's possibly a little messy, but it would be better to use the group access for the fail over service.

Regards

Gull04
Hi Gull04,

This is not a cluster disk but it is only a normal folder and need to mount as SMBFS. For example, the ownership is ID A and able to mount SMBFS on node1. On node2, ID B not able to mount SMBFS due to the folder ownership is ID A.
# 5  
Old 08-23-2016
Hi freshmeat,

OK, sorry for my confusion there - but when you mention nodes I think cluster.

Anyway back to your original problem;

There is no way to have multiple owners for a Unix "file", so your options are limited here. The one that comes to mind is that if you only have a couple of "nodes", you can hopefully standardise your UID's and GID's over the "nodes".

If it is possible to do that I would, as once you get into larger numbers of systems it can become a real pain managing this.

Regards

Gull04
# 6  
Old 08-23-2016
Wouldn't group permissions help?
# 7  
Old 08-23-2016
I'm afraid it won't. Smbfs documentation states the mount point most belong to a user for him/her to be able to mount a share without being privileged. How to Mount a CIFS Share on a Directory You Own (Solaris CIFS Administration Guide)

As already suggested, ACL might help here. You can grant both users the right to get ownership of the directory (write_owner:allow ACL). Before performing the mount, they just need to change it if required and that's it.

Alternatively, you might use sudo to achieve your goal.
This User Gave Thanks to jlliagre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

How to set owner and permission for files/directory in directory in this case?

Hi. My example: I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that chown -R log_adm /log/* chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies

2. Shell Programming and Scripting

Comparing file ownership/permission and content of files located on two different servers

Hi All, can some one suggest me a tool to compare file ownership/permission and contents of files located at two different unix servers? Thanks, Pranav (1 Reply)
Discussion started by: Pranav Bhasker
1 Replies

3. UNIX for Advanced & Expert Users

How to set default file system permission?

Default file system currently is 664. I would like to get it as 774. As other users of the same group was not able execute the file created any any user. chmod cannot be used in my case. (Files are created and executed the programs owned by different vendors) we know that umask is not going... (3 Replies)
Discussion started by: deepakwins
3 Replies

4. UNIX for Dummies Questions & Answers

Setting default directory file permissions and ownership help

I'm trying to setup a directory structure for my staff which enables them full access to files in the directories with their name, and have access to anything in the shared directory. The directory structure looks like this: root@www10 # ls -l total 56 drwxr-xr-x 7 internal internal 4096... (3 Replies)
Discussion started by: v_greg
3 Replies

5. Shell Programming and Scripting

set permission on file to 777

Here is the sample code I'm trying to execute. I see that the permission on the file is set to 755 always I want to change it to 777. Please help me with this. code : #!/usr/bin/perl use File::Path qw(make_path remove_tree); my $path = "2010/sam"; make_path($path,{mode=>0777}); ... (1 Reply)
Discussion started by: hansini
1 Replies

6. Shell Programming and Scripting

Changing file permission upon creation in a directory

I want to change the permission of a file when it gets created in a particular directory. For instance, I have directory MyDir. Everytime a file gets created in that directory, I would like to change the permission to 777. The context is that I have a 3rd party appication running as root. Only... (2 Replies)
Discussion started by: laiko
2 Replies

7. Shell Programming and Scripting

Is possible to use umask to set file permission as 775?

Hi, all! Is it possible to use umask and to set the file permission level as 775? I know I can add chmod into my scripts but I just want to explore the umask option. Thanks! (1 Reply)
Discussion started by: visio2000
1 Replies

8. UNIX for Advanced & Expert Users

Permission denied, but user is owner and has group ownership too

Folks, I have a problem with a particular file, that seems to have some kind of lock on it, that takes around 1 hour approx to timeout. I have used lsof and nothing has an open file handle on it, yet I cannot open it. My user/group owns the file and I can create edit/delete files in... (6 Replies)
Discussion started by: scottrus
6 Replies

9. Red Hat

changing wtmp ownership and permission

Hi, I am using redhat AS 3. Recently, I was asked to implement a security control on the OS: to change ownership of /var/log/wtmp to root:sys and permission to 600. However, when I made the change and reboot the machine, everything was reverted. How come? Please help. The following is the... (1 Reply)
Discussion started by: voa2mp3
1 Replies

10. Linux

files ownership/permission problem

all the files and directories in my system are owned by root only.i try to(from root loggin) change the permission on the file but not permitted.can any one help to fix my problem .also while installing any software always error occur like no makefile available (1 Reply)
Discussion started by: jop
1 Replies
Login or Register to Ask a Question