Sponsored Content
Top Forums UNIX for Dummies Questions & Answers mkdir: cannot create directory `/builds/somedir/': Permission denied Post 302526626 by Technext on Wednesday 1st of June 2011 04:47:05 AM
Old 06-01-2011
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:
Code:
  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/
Code:
  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.
Code:
setfacl -d -m u:harry:rwx /builds/somedir
     setfacl -d -m g:school:rwx /builds/somedir

2. Added following entry in /etc/sudoers file
Code:
# User privilege specification
  harry ALL=(ALL) ALL

--------------------------------------------------

After making these changes, I tried running the mkdir command manually also but no luck. Smilie

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.
-----------------------
Code:
harry ALL=(sally) ALL

-----------------------

Any ideas\inputs?


Regards,
Gaurav

Last edited by pludi; 06-01-2011 at 05:55 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

./ Permission Denied.

Could someone tell me why I am getting a permission denied message when I attempt to run this on an out file? Thanks! (8 Replies)
Discussion started by: trouscaillon
8 Replies

2. Solaris

Permission denied message for parent directory

Hi All, I have an issue that's eating my head for few days. I would appreciate if anyone could help me out in this to resolve this. In Solaris 8 container I am facing the below issue. As oracle user when I do ls -l in /dboracle mountpoint getting permission denied error messages. $ ls... (3 Replies)
Discussion started by: Sreerag446
3 Replies

3. UNIX and Linux Applications

mkdir: cannot create directory

Hi, I have network mount on two servers. One server I can create any directories without any issues, other server with the similar mount, I am not able to create directories starting with number! Creation, name start with a number: $ mkdir 1212 mkdir: cannot create directory `1212': No such... (12 Replies)
Discussion started by: ./hari.sh
12 Replies

4. Shell Programming and Scripting

[Solved] how to create multiple directory in one mkdir command

Hi, Unix Gurus, - I have a simple question, I need create multiple directory. I use mkdir {dir1, dir2, dir3) I got one directory as {dir1, dir2, dir3} I searched @ google, I got answer as above code.:wall::confused: Anybody has any idea Thanks in advance ---------- Post updated... (3 Replies)
Discussion started by: ken002
3 Replies

5. Red Hat

Mkdir: cannot create directory `/home/phpmy/html': Permission denied centos

for incompatibility installation problems, I've decided to reinstall Centos 6.3 as can be seem from the df output, I've partitioned both / and and /home directories $ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda8 12G 5.3G 6.5G 45% / tmpfs ... (2 Replies)
Discussion started by: jediwannabe
2 Replies

6. Shell Programming and Scripting

Trying to create a script to run as root, permission denied

Hello all, I am trying to create a script or a .command file that will run for me and my other techs on many, many Mac OSX computers that will add a file to the /etc/ folder called /etc/launchd.conf Every time I try to run the script, I get "Permission Denied" when trying to put the file into... (13 Replies)
Discussion started by: DonnieNarco
13 Replies

7. UNIX for Dummies Questions & Answers

Mkdir a/b/c # where a/b does not exists. is it possible to create it ?

Is is possible to create the directories in following manner. for example my home dir is empty and i want to create dir a/b/c mkdir a/b/c # where a/b does not exists. (5 Replies)
Discussion started by: anandgodse
5 Replies

8. Shell Programming and Scripting

Permission to Oracle server to create a directory in a particular path

i need to give permission to ORACLE SERVER to create a directory in a particular path. How to do it?Oracle server is installed on SOLARIS (16 Replies)
Discussion started by: rafa_fed2
16 Replies

9. Linux

Permission denied

I am using korn shell When I type in Telnet on cmd line, I get message "cannot execute" How can I get permission to execute command ? In which dir is telnet located ? I looked in /usr/bin dir. but its not there Thanks (1 Reply)
Discussion started by: paramshamnani
1 Replies
MU-MKDIR(1)                                                   General Commands Manual                                                  MU-MKDIR(1)

NAME
mu_mkdir - create a new Maildir SYNOPSIS
mu mkdir [options] <dir> [<dirs>] DESCRIPTION
mu mkdir is the mu sub-command for creating Maildirs. It does not use the mu database. With the mkdir command, you can create new Maildirs with permissions 0755. For example, mu mkdir tom dick harry creates three Maildirs, tom, dick and harry. If creation fails for whatever reason, no attempt is made to remove any parts that were created. This is for safety reasons. OPTIONS
--mode=<mode> set the file access mode for the new maildir(s) as in chmod(1). BUGS
Please report bugs if you find them: http://code.google.com/p/mu0/issues/list AUTHOR
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> SEE ALSO
maildir(5) mu(1) chmod(1) User Manuals May 2011 MU-MKDIR(1)
All times are GMT -4. The time now is 01:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy