Subject: Re: Script permission
To: Rick Copeland <rickgc@calweb.com>
From: Jonathan Marsden <Jonathan@XC.Org>
List: netbsd-help
Date: 02/04/1998 22:34:04
On 4 Feb 1998, Rick Copeland writes:
> I am trying to use the script command on a NetBSD i386 1.21 system.
> When I login as root the Script command works as expected but when I
> login as a user I get:
> %script <enter>
> script: typescript: Permission denied
Most likely, you lack write permission to the current directory, or
perhaps to the file named typescript within it.
Try
%echo junk >typescript
and I expect you will also see a similar 'permission denied' error.
%ls -ld . typescript
will show you the ownership and permissions on both of those objects.
Perhaps you ran script as root in this same directory before, and so
that earlier invocation of script created a file called typescript
owned by, and only writable by, root? In this case
%script someotherfile
will work fine and solve your problem, as would (as root)
#mv typescript root.typescript
followed by (as you)
%script
If the directory itself is the problem, then you would need to specify
a file elsewhere in the directory hierarchy, somewhere you *do* have
write access, perhaps
%script ~/mynewscriptfile
would work, placing the file in your home directory. Or try
%script /tmp/mynewscriptfile
instead.
In any event, the issue is almost certainly not with the script
command at all, but with file and directory permissions.
Hoping this helps,
Jonathan
--
Jonathan Marsden | Internet: jonathan@xc.org | Making electronic
1849 N. Wabash Ave.| Phone: +1 (909) 794 1151 | communications work
Redlands, CA 92374 | FAX: +1 (909) 794 3016 | reliably for Christian
USA | http://www.xc.org/jonathan | missions worldwide