Unix/Linux Go Back    


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

UNIX for Beginners Questions & Answers


Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 10-04-2017   -   Original Discussion by arunkumar_mca
arunkumar_mca's Unix or Linux Image
arunkumar_mca arunkumar_mca is offline
Registered User
 
Join Date: Oct 2004
Last Activity: 11 December 2017, 10:01 AM EST
Posts: 395
Thanks: 61
Thanked 2 Times in 2 Posts
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 Unix and Linux 10-05-2017   -   Original Discussion by arunkumar_mca
rbatte1's Unix or Linux Image
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 23 January 2018, 6:47 AM EST
Location: Lancashire, UK
Posts: 3,445
Thanks: 1,494
Thanked 673 Times in 606 Posts
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 Unix and Linux 10-05-2017   -   Original Discussion by arunkumar_mca
arunkumar_mca's Unix or Linux Image
arunkumar_mca arunkumar_mca is offline
Registered User
 
Join Date: Oct 2004
Last Activity: 11 December 2017, 10:01 AM EST
Posts: 395
Thanks: 61
Thanked 2 Times in 2 Posts
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 Unix and Linux 10-05-2017   -   Original Discussion by arunkumar_mca
rbatte1's Unix or Linux Image
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 23 January 2018, 6:47 AM EST
Location: Lancashire, UK
Posts: 3,445
Thanks: 1,494
Thanked 673 Times in 606 Posts
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
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 06:54 PM
Apache write permission issues to another user owned directory rakeshkumar Web Programming 2 10-18-2013 03:03 AM
search any user files with write permission michlix Shell Programming and Scripting 1 01-12-2012 11:52 PM
write permission to a perticular user to a directory siba.s.nayak Shell Programming and Scripting 1 09-04-2009 09:37 PM
Find all files with group read OR group write OR user write permission shunter63 Shell Programming and Scripting 5 01-14-2009 01:06 PM



All times are GMT -4. The time now is 09:59 PM.