Re: Why root?
Re: Why root?
- Subject: Re: Why root?
- From: Christopher Nebel <email@hidden>
- Date: Fri, 2 Aug 2002 12:41:58 -0700
On Friday, August 2, 2002, at 08:17 AM, John Delacour wrote:
Why does this script list the root instead of the user directory...
do shell script "ls -l"
and require us to to "cd ; ls -l" ?
The Terminal takes you to the user directory without any coercion. So
does BBEdit. What happens if a user has no access permission to the
root?
Because "do shell script", or rather the "sh" process that it invokes,
inherits the working directory of its parent, and the Finder launches
everything with a working directory of "/". If a user didn't have read
permission for /, they'd get an empty result, because "ls" returns 0
even if it failed with EPERM. An admin would have to muck with that,
though -- / is readable by everyone by default.
(What do you mean "BBEdit takes you to the user directory"? How can
you tell?)
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >Why root? (From: John Delacour <email@hidden>) |