
June 1st, 2011, 03:50 AM
|
|
Contributing User
|
|
Join Date: May 2010
Posts: 35
Time spent in forums: 4 h 57 m 48 sec
Reputation Power: 3
|
|
|
Mkdir: cannot create directory `/builds/somedir/': Permission denied
Hi,
I am trying to run a shell script which contains an mkdir command as part of the execution. The script fails with the following error:
mkdir: cannot create directory `/builds/somedir/': Permission denied
The user running the script is 'harry' and belongs to group 'school'. The target directory is owned by another user ‘sally’.
ls -ld /builds/somedir/
drwxr-xr-x+ 14 sally bin 1024 May 31 18:01 /builds/somedir/
The above path (/builds/somedir/) is a Samba share.
To make it work, I tried few things but to no avail:
--------------------------------------------------
1. setfacl -d -m u:harry:rwx /builds/somedir
setfacl -d -m g:school:rwx /builds/somedir
2. Added following entry in /etc/sudoers file
# User privilege specification
harry ALL=(ALL) ALL
--------------------------------------------------
After making these changes, I tried running the mkdir command manually also but no luck.
The OS is GNU\Linux.
There is one thing weird that I just noticed: even with root user, I was not able to create directory in the given path. Does it has anything to do with Samba share?
After noticing this behavior, I removed the above entry from sudoers file, and instead added the following but still no luck.
-----------------------
harry ALL=(sally) ALL
-----------------------
Any ideas\inputs?
Regards,
Gaurav
|