Hi, ouch, bad idea, wrong list, but:
4 solutions: 1.) let your webserver run as root (NEVER, NEVER do this!!) 2.) write a daemon that runs as root and does such things for your normal programs. (Overkill in this case) 3.) use sudo to allow the webserver's user to run exactly that command (with exactly that parameters) 4.) put that mount into your /etc/fstab with parameters "noauto, user" (noauto = don't mount at system boot time, user = allow any user to mount) cu Michael 24.07.2002 13:55:13, "Heiss, Christian" <[EMAIL PROTECTED]> wrote: > > > From: "Heiss, Christian" <[EMAIL PROTECTED]> > > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > Subject:Mount something with my perl script > Date: Wed, 24 Jul 2002 13:55:13 +0200 > > > > > Hello, > > > I don't know if this is the right mailing list, but well... > > > How can I mount something with my perl script? > I've got always the error: mount: only root can do this > > > So I changed my script something like this: > > > #! /usr/bin/perl -w > `su - root <password> -c 'mount -t smbfs -o credentials=<some.file> // > <windows/share> /<mount/point>'`; > > > If I start the script in the shell as root, it works fine. > > > If I start the script in the shell as some other user, it asked me for the > password. > > > If I start the script in via the Internet- Browser, in the log files it first > asked for the password and after one second it completes to "incorrect > password" > > > How can I change my script to execute the mount command as root > automatically, or to mount something within my perl script??? > > > > > Thanks > > > > > > Regards > > > > > Christian Heiss > > > _______________________________________________ __ > > LANconcept Moll GmbH > > Benzstrasse 1 > 88074 Meckenbeuren > > Voice: +49 (0) 7542 940 3 - 18 > > Fax: +49 (0) 7542 218 24 > Mobil: +49 (0) 171 80 64 254 > <mailto:[EMAIL PROTECTED]> > visit our website <http://www.datentechnik- moll.de> > > _______________________________________________ __