UNIX for Beginners Questions & Answers

If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum!

Setting write permission for particular user

👤 Login to reply

    #8  
Old 10-04-2017
arunkumar_mca arunkumar_mca is offline
Registered User
 
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
Sponsored Links
    #9  
Old 10-05-2017
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
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
Sponsored Links
    #10  
Old 10-05-2017
arunkumar_mca arunkumar_mca is offline
Registered User
 
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
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
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
The Following User Says Thank You to rbatte1 For This Useful Post:
arunkumar_mca (10-06-2017)
Sponsored Links
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Allow user without dir write permission to execute a script that creates files waavman UNIX for Advanced & Expert Users 14 01-08-2014 05:54 PM
Apache write permission issues to another user owned directory rakeshkumar Web Programming 2 10-18-2013 02:03 AM
search any user files with write permission michlix Shell Programming and Scripting 1 01-12-2012 10:52 PM
write permission to a perticular user to a directory siba.s.nayak Shell Programming and Scripting 1 09-04-2009 08:37 PM
Find all files with group read OR group write OR user write permission shunter63 Shell Programming and Scripting 5 01-14-2009 12:06 PM



All times are GMT -4. The time now is 11:11 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?