This discussion is archived
4 Replies Latest reply: Nov 15, 2011 12:29 PM by 898229 RSS

File Permissions in Solaris 10

898229 Newbie
Currently Being Moderated
Hi,

I have a problem with permissions on a shell script file. Although the file permissions are "-rwxrwxr-x" anyone else in the group, apart from file owner can't execute this file.

Regards,
  • 1. Re: File Permissions in Solaris 10
    Nik Expert
    Currently Being Moderated
    Hi.
    It's look like very strange.
    Please show what error message you see.

    Please show
    ls -la <full_path_ to_this_script>
    ls -lad < for every directory in path to this script start from / >


    Regards.
  • 2. Re: File Permissions in Solaris 10
    898229 Newbie
    Currently Being Moderated
    First of all thanks for trying to help me. The command line output for:

    --> "+ls -al /tmp/restart.sh+" is "+-rwxrwxr-x 1 admin1 admin ...+"
    --> "+ls -ald /tmp+" is "+drwxrwxrwt 13 root sys ...+".

    When anyone else in the admin group, besides the owner of the file, try to execute that file they get the following error: "+error: chmod: warning: can't change /tmp/restart.sh+".
    If I change file owner it works properly, but I don't want to change the owner each time the file is used. Maybe it's all about that sticky bit?!

    Best regards,
  • 3. Re: File Permissions in Solaris 10
    Nik Expert
    Currently Being Moderated
    Hi.
    It's aplication specific problem (script problem) not system problem.

    It's look like this script modify permissions on some files that available only for group admin

    You can try set group sticki bit ( chmod g+s /tmp/restart.sh )
    But before, change first line of script from
    #!/bin/sh
    to
    #!/bin/sh -p

    Regards
  • 4. Re: File Permissions in Solaris 10
    898229 Newbie
    Currently Being Moderated
    Hi Nik,

    I have tried what you said to do, but still no results. I found out that the "+/tmp/restart.sh+" is actually the path to temporary reset script. This script is used to provide a GUI to select and restart some interface processes, but I'm newbie at scripting and it's difficult for me to modify that script.
    I appreciate your help.

    Best regards,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points