Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Chmod question

    Reply
    mothmanex | # 1 | 2010-03-12, 02:38 | Report

    Hello people, I have been trying to run a script for some time, and so far I haven't been lucky. I have already investigated about this issue I'm having, and I only found the next things.

    1.- Need to gain root (sudo gainroot, works on my n900).
    2.- the scripts that I want to run as executables must not be on MyDocs, since it is a VFat Partition (done, moved my files to /Home/User/ and /Home/User/X/





    Can somebody tell me what I'm doing wrong? (I'm new to linux, but I want to learn)

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Ralph | # 2 | 2010-03-12, 03:01 | Report

    You have an extra space between + and x.
    Try chmod +x move-to-opt.sh

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Ralph For This Useful Post:
    mothmanex

     
    rm42 | # 3 | 2010-03-12, 03:07 | Report

    There are several things you are doing wrong. Where to beguin?

    - You shouldn't have a space between + and x.
    - cd means "change directory. So, why are you trying to cd into x?
    - Make sure the file is where you think it is first using the ls command.

    - See this post for a mini command line tutorial:
    http://talk.maemo.org/showthread.php...337#post535337

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to rm42 For This Useful Post:
    mothmanex

     
    benh_n900 | # 4 | 2010-03-12, 03:25 | Report

    It looks like the first attempt (the second line) in the last screenshot worked - if you type:

    ls -l

    you will see whether or not it is executable.

    You should see something like:

    Code:
    Nokia-N900-42-11:~# ls -l
    -rw-r--r--    1 root     root            0 Mar 11 21:16 move-to-opt.sh
    Nokia-N900-42-11:~# chmod +x test
    Nokia-N900-42-11:~# ls -l
    -rwxr-xr-x    1 root     root            0 Mar 11 21:16 move-to-opt.sh
    Nokia-N900-42-11:~#
    To help with your learning, the permissions can be chunked as follows:

    - rwx r-x r-x

    I won't go into too much deal (a google search will tell you everything), but the first '-' means it's a normal file (d would be a directory), then the next three groups represent permissions.

    Group 1 = user permissions
    Group 2 = group permissions
    Group 3 = public/world/anonymous permissions

    the first letter is read permissions. r=yes, -=no
    the second is write permissions. w=yes, -=no
    the third is execute permissions. x=yes, -=no

    so in this example, the user can read, write and execute.
    other users in the same group as this user can read and execute
    and any user can read and execute

    (note: In practice, on the n900, multi user and groups aren't really used)

    Hope that helps!

    Ben

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to benh_n900 For This Useful Post:
    mothmanex, Natan_xy

     
    mothmanex | # 5 | 2010-03-12, 04:15 | Report

    Thanks everyone. One last question, I have made everything from before, but when I use the command " ./move-to-opt.sh " the terminal returns the next message "/bin/sh: move-to-opt.sh: not found"

    Edit | Forward | Quote | Quick Reply | Thanks

     
    codeMonkey | # 6 | 2010-03-12, 06:10 | Report

    Are you in the right directory?
    You can do the ls -l command as above to see if move-to-opt.sh is in your current directory. If not you'll need to use cd to change directory first.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    blwthompson | # 7 | 2010-03-12, 06:53 | Report

    hey what is that program in the first screenshot?

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout