🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.shell
1 messages
1 total messages Started by Usenet Administrator Wed, 10 Oct 1990 16:22
Legally overriding permissions from shell scripts
#1462
Author: Usenet Administrator
Date: Wed, 10 Oct 1990 16:22
34 lines
1865 bytes
I have written a shell script that handles automated file transfers between
users on our network.  It works by a using issuing the command

% ship <to-user> <filelist>

The ship script then creates a "package" and sends it to a server program on
the destination machine.

The server program, recv, is invoked via a sendmail/smail alias.  Recv accepts
as its input the package file.  It then unpacks the file and leaves the
resultants in the to-user's $HOME and mails notifications to the sender and
receiver.

Or at least it should.  I have discovered that some user's have the permissions
set on their $HOME so that recv can't perform the mv.

How can I override the user's permissions so that recv can write to the 
directory?  I *thought* that scripts run from sendmail/smail aliases ran as
root, and therefore this would be a non-problem.  Obviously, I was wrong.

The current solution is to check the writability of the to-user's $HOME.  If
recv can't write to it, then he leaves the files in a spool/directory from 
which the user can copy them from.  This is not a good solution, since some
of the end users of this program are not unix literate.

I hope this was clear enough.

Thanks.

-- 
System Administrator            root@supernet.haus.com
Harris Adacom Corporation       usenet@supernet.haus.com
Dallas, Tx                      uunet!iex!supernet!root
214/386-2356                    uunet!iex!supernet!usenet
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads