Jost Wittmann
Dabbler
- Joined
- Feb 23, 2014
- Messages
- 34
Hi!
I am trying to get a simple script running on FreeNAS 11.3U2-1.
The first two lines/commands are supposed to create a directory:
I run the script from the FreeNAS shell:
I have set the permissions of the script to 777 - temporarily.
I get the response that the directory path/to/directory/subdirectory1/subdiretory2 does not exist („No such file or directory“). Consequently, all following commands of the script fail, because they are supposed to change ownership an permissions of the new direcctories.
If I run the command as a user of the group wheel, („su username sh ....“) I get no errormessages. But still, the directories do not get created.
If I copy and paste the commands from the script into the shell, they work perfectly (run as root user).
What am I missing here? Thanks for helping!
I am trying to get a simple script running on FreeNAS 11.3U2-1.
The first two lines/commands are supposed to create a directory:
Code:
#!/bin/bash mkdir path/to/directory/$1/subdirectory2
I run the script from the FreeNAS shell:
Code:
sh path/to/script.sh subdirectory1
I have set the permissions of the script to 777 - temporarily.
I get the response that the directory path/to/directory/subdirectory1/subdiretory2 does not exist („No such file or directory“). Consequently, all following commands of the script fail, because they are supposed to change ownership an permissions of the new direcctories.
If I run the command as a user of the group wheel, („su username sh ....“) I get no errormessages. But still, the directories do not get created.
If I copy and paste the commands from the script into the shell, they work perfectly (run as root user).
What am I missing here? Thanks for helping!