Setting write permission for particular user

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Setting write permission for particular user
# 8  
Old 10-04-2017
I asked our configuration team to add group they are not letting me do that. They dont want to create a new group. The user files right now sent by ftpuser1 land on one place. From where the amgr trasfer to the directory.

Now we are tying to automate the process. so that ftpuser1 can directly send the file to that directory without amgr involvement. Basically we are planning to provide a script to ftpuser1 and ask them to execute which will take the file from the path and transfer it to directory without amgr involvement. With the current permission we are getting permission errror as ftpuser1 dont have write permission.

Note: I am not sure if there a feasible solution to do without creating group or giving permission on the file/directory using a SUID
# 9  
Old 10-05-2017
For ftpuser1 to create, delete or replace a file, it will need write access to the directory. Even if you have no permissions on the file you can then remove the file and create your own unless the directory has the sticky bit set. Can you do ls -ld /path/to/directory and have a look at the permissions? There are the usual bits for user, group & other but if the last bit it s t then the sticky bit is set. In this case, you can only remove your own files. Mainly used in /tmp so you don't dispose of other peoples' temporary files, it can have uses elsewhere too.

Can you paste the output into the thread?


Regards,
Robin
# 10  
Old 10-05-2017
Please find the output
Code:
ls -ld /us/rep/reference
drwxr-xr-x 2 amgr  u00  4096 Sep  6 14:48 /us/rep/ref/reference

# 11  
Old 10-05-2017
Is ftpuser1 a member of the u00 group? Is anyone else? If yes then no, you might get away with:
Code:
chmod 775 /us/rep/ref/reference

Alternatively, would you consider:
Code:
setfacl -m u:ftpuser1:rw /us/rep/ref/reference/DCI.dat

Of course, this assumes you are on RHEL or similar (which you haven't told us yet) It may fail completely if not. If this is the case, please post the output from uname -a so we know what we're dealing with.

If the setfacl works, then you would have to issue this every time the file is created and it would be sensible to do this as user amgr


It's probably not the best way to do it, but if there is lack of flexibility elsewhere then you may be forced this way. It's not as bad as a cron job every minute as root setting the ownership. Believe me, I've seen it.




Robin
This User Gave Thanks to rbatte1 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Linux sftp — how to add new user to access exist directory with write permission?

I have built a website and I can access and edit the website'files on server via the root user. The current file and directory structures are not changeable. Now I am hiring a webpage designer to help me re-design some pages, I am going to let the designer edit the files directly on the server. So... (5 Replies)
Discussion started by: uwo-g-xw
5 Replies

2. Solaris

Giving read write permission to user for specific directories and sub directories.

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
Discussion started by: blinkingdan
1 Replies

3. AIX

Assign read write permission to the user for specific dir and it's sub dir and files in AIX

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies

4. UNIX for Advanced & Expert Users

Allow user without dir write permission to execute a script that creates files

In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Discussion started by: waavman
14 Replies

5. Web Development

Apache write permission issues to another user owned directory

Hi I am trying to make a web program which is command line equivalent. i have done the coding in cgi program in perl and html for basic forms to take inputs. when i ran the program from web application i see permission denied messages. after analyzing i found apache is running as wwwrun which... (2 Replies)
Discussion started by: rakeshkumar
2 Replies

6. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies

7. Shell Programming and Scripting

search any user files with write permission

Guys, i wanna get any user files with write permission (on user or group permission) for review but i confuse with -perm parameter. any body can help me to explain what is that mean? thank's (1 Reply)
Discussion started by: michlix
1 Replies

8. Shell Programming and Scripting

write permission to a perticular user to a directory

Hi, The requirement is like, the program needs 2 argument one is user_id and second one is directory path. My script will check if that user_id has write access to the directory path. The directory path may be in any file system like AFS or NFS. Can any one please suggest some points to... (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

9. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
Login or Register to Ask a Question