Operating System - HP-UX
1753684 Members
5465 Online
108799 Solutions
New Discussion юеВ

Re: folert Permissions ...can not execute file..

 
amonamon
Regular Advisor

folert Permissions ...can not execute file..

Hello I do have directory with some scripts..created as root user..now I would like to have user /I already added user/ to be able to user rwx those scripts and files in that directory..

here is /etc/passwd:

root:x:0:1:Super-User:/:/bin/bash
newuser:x:60106:1:testtest:/export/home/newuser:/bin/sh

but this newuser can not execute any on scripts in directory but I put as root 777 Permissions to that directory..still not working..

any help...:(
19 REPLIES 19
Chengchai Theerakalkul
Occasional Advisor

Re: folert Permissions ...can not execute file..

Hi,
Please login with newuser and cd to directory that you create script file. If newuser cannot please check directory permission. If it can cd to that directory run ./<script_file>. let me know error mesg if it failed.
V. Nyga
Honored Contributor

Re: folert Permissions ...can not execute file..

HI,

you also need at least 555 permissions to the scripts inside the directory.
Also are there other scripts inside the scripts?

Volkmar
*** Say 'Thanks' with Kudos ***
amonamon
Regular Advisor

Re: folert Permissions ...can not execute file..

script (test.tmp) is simple:

echo testtest> /export/home/newuser/User.cron



cd works perfect..but if I want to execute it I get:

./test.tmp: /export/home/newuser/User.cron: Permission denied



I guess it can not write file into directory..
V. Nyga
Honored Contributor

Re: folert Permissions ...can not execute file..

Hi again,

>script (test.tmp) is simple:
>echo testtest> /export/home/newuser/User.cron
>
>./test.tmp: /export/home/newuser/User.cron: >Permission denied

So check the permissions of /export/home/newuser/User.cron

V.
*** Say 'Thanks' with Kudos ***
amonamon
Regular Advisor

Re: folert Permissions ...can not execute file..

"So check the permissions of /export/home/newuser/User.cron"

User.cron is a file that can not be created by that script into certani directory..
I do not know why..
Or more clear what should I do with root created directory in order to be able to write into it certain user created files..
and how?

thanks
V. Nyga
Honored Contributor

Re: folert Permissions ...can not execute file..

Hi again,

you have to open permissions for these directories - the better solution would be to open permissions for a certain group and to assign the needed users to this group.
So you don't have to open permissions for the 'world'.
Can you create a file in this directory by 'touch'?

V.
*** Say 'Thanks' with Kudos ***
amonamon
Regular Advisor

Re: folert Permissions ...can not execute file..

$ touch tempFILE
touch: tempFILE cannot create
$


right...can not create file in directory..:(

how to enable this?
V. Nyga
Honored Contributor

Re: folert Permissions ...can not execute file..

What does 'll /export/home' and 'll /export/home/newuser' says?
Which group does newuser is in?

V.
*BTW. - you should work on your points assignment rate:
You have assigned points to 91 of 240 responses
http://forums11.itrc.hp.com/service/forums/pageList.do?userId=CA1394601&listType=unassigned&forumId=1 *
*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: folert Permissions ...can not execute file..

root:x:0:1:Super-User:/:/bin/bash

The first thing you should immediately do is change this back to the proper shell:
root:x:0:1:Super-User:/:/sbin/sh

Root can't have any other shell but this one. If you insist, you can execute your favorite shell once you login.

>./test.tmp: /export/home/newuser/User.cron: Permission denied

To find the permission problem you need to do:
$ id
$ ll /export/home/newuser/User.cron
$ ll -d /export/home/newuser /export/home /export