Folders with more than one 'owner'


 
Thread Tools Search this Thread
Operating Systems Solaris Folders with more than one 'owner'
# 1  
Old 07-25-2012
Folders with more than one 'owner'

I have a peculiar problem.
I have a particular directory with the following characteristics:

-bash-3.00# ls -lah
total 18
drwxr-x--- 7 gandalf shire 512 jul 3 07:20 .
drwxr-x--- 11 gandalf
shire 512 mai 10 2010 ..
drwxr-xr-x 6 gandalf shire 3,0K jul 24 19:25 brasdeff
drwxr-xr-x 2 gandalf shire 512 mar 20 17:03 brasesmm
drwxr-xr-x 3 gandalf shire 512 mar 20 17:00 brasfrpp
drwxr-xr-x 2 gandalf shire 512 jul 6 10:37 brasptpl


I need to create a user for FTP access, which we call here 'hobbit';
How to create this user, hobbit, has write access to these folders, without changing the permissions writing these folders and without changing the 'owner'?
# 2  
Old 07-25-2012
Not directly possible based on the information shown. You only have write permissions for owner, not group or other.

(Note: I would not even consider having a duplicate UID).

Other techniques available include giving the ftp user a normal isolated home directory and using a periodic root cron to collect data and place it into the final directories with the correct permissions. This technique needs an interlock mechanism on the relay directory to ensure that ftp transfers finish before file copying takes place.
# 3  
Old 07-25-2012
So, you want to change the permissions without changing them. I'm afraid that's not going to work.

If you make the folder group-writable and put your hobbit in the 'shire' group they will have access.
# 4  
Old 07-25-2012
I Solved my problem!
I used the commands:

# id gandalf
uid=100(gandalf) gid=104
# usermod -u 100 -o hobbit



With the same ID of Gandalf, the hobbit can write to the folder 'brasdeff', for example.
Smilie
# 5  
Old 07-25-2012
Not recommended to have two users with the same UID. As well as being just plain confusing, it can cause backup and restore software to malfunction. You might as well do the ftp process as user gandalf.
Don' forget that any files previously owned by user hobbit are now orphans.
# 6  
Old 07-25-2012
Thanks for the warning! I'll try to be careful, but as that user hobbit is only for specific access to this folder, and will be for processes like 'put' and 'get', I think that's enough.
I can not allow the user to login with Gandalf, since this user has a password that can not provide, since it is used by a critical system.

Thank you!
# 7  
Old 07-25-2012
I'm not sure what will happen now if they attempt to change their password, though.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Archive folders and sub folders

Hi Can i archive folder and folders in with the tar command My files are located in subfolders Eg: Folder1/Folder1_1/*.pdf Folder1/Folder1_2/*.pdf Folder1/Folder1_3/*.pdf so i would like to tar all the files in Folder1_1 and Folder1_2 only not Folder1_3 that should be done next... (2 Replies)
Discussion started by: cnrj
2 Replies

2. Shell Programming and Scripting

Copy between two different folders containing same sub-folders

I have a folder like this ls input1 dir1 dir2 dir3 file1 file2 file3 dir1, dir2 and dir3 are sub-folders inside the folder input1 ls input2 dir1 dir2 dir3 file1 file2 file3 My dir1 in input1 folder has files f1, f2, f3 and f4. My dir1 in input2 folder has file f4 and f5. ... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

3. Solaris

Privileges : modify dir/file owner by other that's not owner

i need to do the following operations in solaris 10: 1.change owner and group owner for files which are not owned by the current user and user group 2.to can delete files in the /tmp directory which are not of the current user 3. allow to a standard user the deletion of files in the /tmp... (1 Reply)
Discussion started by: sirmark
1 Replies

4. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

5. Shell Programming and Scripting

Making 99 folders 99 folders deep

I am trying to make a unix shell script that will make 99 folders 99 deep (counting the first level folders). So far i have made it make the first 99 folders and 99 more in all of the folders. The only problem is the only way i have found is copying and pasting part of the script over and over and... (18 Replies)
Discussion started by: YukonAppleGeek
18 Replies

6. UNIX for Advanced & Expert Users

How UNIX admin set up this? how files of 744 of other owner can be removed by another owner?

Hi all, We have some files are under 744 permissions and the the owner is say owner1 and group1. Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that. ... (14 Replies)
Discussion started by: TheGunMan
14 Replies

7. UNIX for Advanced & Expert Users

find size of folders and its subfolders with the Owner details

HI, I have the following command that shows me the total size of folders and subfolders : du -hs *| sort -n result: 1.0M sandeep 1.4G sandy 1.4M important 1.6M files but I will need to know the size of folders and its subfolders( not size of individual files though)... (5 Replies)
Discussion started by: bsandeep_80
5 Replies

8. Solaris

Owner of file gets 'not owner' error for chgrp

Hi Folks, I know that changing users and groups is pretty basic admin, but this one has got me stumped. When I try to change the group of a file for which I am the owner for, it still gives me a 'Not owner' error. For example, when I am logged in as 'webadmin', I have the following file: ... (4 Replies)
Discussion started by: brizrobbo
4 Replies

9. UNIX for Dummies Questions & Answers

Copying Folders without some folders... ;-)

I am in a fix....... I have to write a backup script to backup say Folder A. Folder A contains n folders 1,2 ,3 .....n. my script should copy A without folder 2 & 3. Is there anyway I can do it without writing individual copy commands???? Please help.... (5 Replies)
Discussion started by: chimpu
5 Replies

10. Shell Programming and Scripting

Backing up Folders without some folders...;)

I am in a fix....... I have to write a backup script to backup say Folder A. Folder A contains n folders 1,2 ,3 .....n. my script should copy A without folder 2 & 3. Is there anyway I can do it without writing individual copy commands???? Please help.... (1 Reply)
Discussion started by: chimpu
1 Replies
Login or Register to Ask a Question