Sponsored Content
Top Forums Shell Programming and Scripting Trying to create a script to run as root, permission denied Post 302793101 by hanson44 on Thursday 11th of April 2013 04:59:55 PM
Old 04-11-2013
Don't put the ln command in the shell script. It doesn't work in the shell script because of the same permissions problem.

The ln command only needs to be run once, as root, outside the shell script:
Code:
# ln -s /Users/jlemme2/Desktop/launchd.conf /etc/launchd.conf

Then, whenever you want, run the script to create /Users/jlemme2/Desktop/launchd.conf which you have write permission to create.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unable to run program, Permission denied

Hi All, I am working on Solaris Sparc 9 and I developed application and in that I want to open any file when any action is happened but when I am trying to do the same.I am getting the error -- "Error launching /test.txt", "", "Process.execAndWait", "java.io.IOException: Cannot run... (0 Replies)
Discussion started by: smartgupta
0 Replies

2. UNIX for Dummies Questions & Answers

Permission denied when changing root password after reset

I have a Solaris 10 machine that I didn't know the root password to so I went into single user mode and removed the password from the shadow file and rebooted and I am able to login with no password now. But my problem is that when I try to change the root password from no password to something... (0 Replies)
Discussion started by: darkone_d1_2000
0 Replies

3. Shell Programming and Scripting

shell script and Permission denied

Have the following in a .sh file. printf "Installing ... \ r" cd $ ORG_DIR / a_a . / configure> error.log Make 1> error.log 2> error.log make install> error.log But when I run I get the following. install.sh: line 270:. / configure: Permission denied make: *** No rule two make target... (3 Replies)
Discussion started by: Mumie
3 Replies

4. Shell Programming and Scripting

Can root user run chmod 000 permission shell script?

Hi, I have a shell script file which is set to access permission 000. When I login as root (sudo su) and try to run this script, I am getting the Permission denied error. I have read somewhere that root admin user can execute any kind of permission script. Then why this behavior? However, I can... (1 Reply)
Discussion started by: royalibrahim
1 Replies

5. UNIX for Dummies Questions & Answers

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'.... (5 Replies)
Discussion started by: Technext
5 Replies

6. AIX

Permission Denied issue on AIX 6.1 using Root

I have the following problem on my AIX 6.1 server. I logged in with Root ID to this folder etc/opt/symantec/scspagent/lib/instfunlib I try changing the folder permission but I keep getting this output : chmod: /opt/symantec/scspagent/lib/instfunlib: Permission Denied I did a listing on it... (3 Replies)
Discussion started by: mcdsweet98
3 Replies

7. Shell Programming and Scripting

Help with Permission Denied on script with sed

I am trying to develop a script to replace a lowercase URLs with an upper case URLs in HTM files. Basically.. replace href="somelowercaseurl" with href="SOMEUPPERCASEURL". In place. the href's are not located in any specific position in the file. Here is my shell script : export... (5 Replies)
Discussion started by: smarty
5 Replies

8. Linux

/var/lock/subsys permission denied for root

Hello I have simple line of code here: FILE *lockfp = fopen("/var/lock/subsys/processName", "w"); which is denied even running as root. The result is locking failed for the following reason: Permission denied How is this possible? Why is this happening? Thanks for your... (4 Replies)
Discussion started by: flagman5
4 Replies

9. 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
AUTOMOUNTD(8)						    BSD System Manager's Manual 					     AUTOMOUNTD(8)

NAME
automountd -- automatic mount / unmount daemon for autofs SYNOPSIS
/usr/libexec/automountd [-v] [-n] [-T] [-o opts] [-D name=value] DESCRIPTION
automountd is a daemon that responds to requests from autofs to mount and unmount network filesystems, and to supply the contents of directo- ries, based on the contents of automounter maps. The automountd is started on demand by launchd(8). As the daemon is launched by launchd, the options below would be specified in the ProgramArguments key in the launchd plist for automountd. See FILES below. OPTIONS
-v Log to syslogd(8) more detailed information about actions taken by automountd. -n Disable browsing of all maps. -T Increase by 1 the logging level for messages printed to the standard output information about requests received from autofs, process- ing done for those requests, and replies sent to autofs. The default level of 0 causes no information to be logged; each higher value causes more information to be logged. -o opts Apply the options specified by opts to all mounts by default. The options for a particular mount can override these options. -D name=value Set the environment value specified by name to the specified value. Environment variables can be referred to in map entries; the value of the environment variable is substituted for the reference to the variable. FILES
/etc/autofs.conf configuration file used to manage automountd /System/Library/LaunchDaemons/com.apple.automountd.plist launchd plist SEE ALSO
auto_master(5), autofsd(8), automount(8), autofs.conf(5), mount(8), mount_nfs(8), launchd(8), launchd.plist(5) Darwin April 4, 2007 Darwin
All times are GMT -4. The time now is 10:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy