jffs permission denied

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

RASG

Regular Contributor
Hi.

Im trying to execute a shell script from /jffs but it says Permission denied

Code:
root@DD-WRT:/jffs# ./ myscript.sh
-sh: ./: Permission denied
root@DD-WRT:/jffs#

The script is executable

Code:
root@DD-WRT:/jffs# ls -la
drwxrwxrwx    7 root     root             0 Nov 11 12:18 .
drwxr-xr-x   15 root     root           162 Jul 24 09:01 ..
-rwxrwxrwx    1 root     root          3990 Nov  7 19:24 myscript.sh
root@DD-WRT:/jffs#

If anyone could help me understand whats going on...
 
Hi.

Im trying to execute a shell script from /jffs but it says Permission denied

Code:
root@DD-WRT:/jffs# ./ myscript.sh
-sh: ./: Permission denied

Please, remove blank space between "./" and "myscript.sh".
 
Last edited:
Code:
root@DD-WRT:/jffs# ./myscript.sh
-sh: ./myscript.sh: not found
root@DD-WRT:/jffs#

and the content of myscript.sh

Code:
#!/bin/sh

echo $(nvram get wl0_ssid)
 
Yes.

Anticipating your thoughts, i opened a PuTTY SSH session and tried

Code:
root@DD-WRT:/jffs# touch aaa.sh
root@DD-WRT:/jffs# chmod +x aaa.sh
root@DD-WRT:/jffs# ls -la
drwxrwxrwx    7 root     root             0 Nov 11 14:12 .
drwxr-xr-x   15 root     root           162 Jul 24 09:01 ..
-rwxr-xr-x    1 root     root             0 Nov 11 14:12 aaa.sh
-rwxrwxrwx    1 root     root            39 Nov 11 13:06 myscript.sh

still the same results

Code:
root@DD-WRT:/jffs# ./aaa.sh
-sh: ./aaa.sh: Permission denied
 
Windows and Linux text files are different. You may convert Windows new-lines to Linux style by:
Code:
tr -d '\r' < myscript.sh > linux_myscript.sh
and run script by:
Code:
chmod +x linux_myscript.sh
./linux_myscript.sh

Yes.

Anticipating your thoughts, i opened a PuTTY SSH session and tried

Code:
root@DD-WRT:/jffs# touch aaa.sh
root@DD-WRT:/jffs# chmod +x aaa.sh
root@DD-WRT:/jffs# ls -la
drwxrwxrwx    7 root     root             0 Nov 11 14:12 .
drwxr-xr-x   15 root     root           162 Jul 24 09:01 ..
-rwxr-xr-x    1 root     root             0 Nov 11 14:12 aaa.sh
-rwxrwxrwx    1 root     root            39 Nov 11 13:06 myscript.sh

still the same results

Code:
root@DD-WRT:/jffs# ./aaa.sh
-sh: ./aaa.sh: Permission denied
That's right for an empty file. See why.
 
Last edited:

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top