Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!metro!metro!asstdc.scgt.oz.au!nsw.news.telstra.net!act.news.telstra.net!psgrain!usenet.eel.ufl.edu!news.mathworks.com!newsfeed.internetmci.com!in2.uu.net!ott.istar!istar.net!van.istar!west.istar!n1van.istar!van-bc!unixg.ubc.ca!rover.ucs.ualberta.ca!scanner.worldgate.com!news.insinc.net!econ4.econnect.net!dave@econnect.net From: "Matthew Mung" <matthew@econnect.net> Newsgroups: comp.unix.bsd.bsdi.misc,comp.unix.misc,comp.programming Subject: Re: Perl Script Permissions Date: 25 Aug 1996 00:15:38 GMT Organization: Matthew Mung Lines: 73 Message-ID: <01bb9219$9cac5d00$53d632cc@matthew.econnect.net> References: <321E1027.58DB@he.net> NNTP-Posting-Host: 204.50.214.83 Mime-Version: 1.0 Content-Type: text/plain; charset=CN-BIG5 Content-Transfer-Encoding: 8bit X-Newsreader: Microsoft Internet News 4.70.1132 Xref: euryale.cc.adfa.oz.au comp.unix.bsd.bsdi.misc:4701 comp.unix.misc:24751 comp.programming:27818 Hi, My suggestion is do not try to do it this way!!! I don't believe you can do it by only using PERL only. It is because you cannot easily to impermant the security without touching any system level call and modify any system function. Actually, I have few system that have the function you want. And all the user can upload and change their web page without having any user account on the system. First system, Netscape Enterprise Server 2.0 on a SGI and NT box. You can setup a user account on the Netscape, not OS itself, and restrict the user write access to different directory. So the user can upload their web page directly to the server by using Netscape gold publish function. Second system, A BSDI 2.1 system and runing Apache WWW server plus Microsoft FontPage Extansion. Same as the first one, you can setup the user account and right by using tridition .htaccess file. So the user can push the page by using the FontPage. I like the first method more than second; however, Netscape does not have Enterprise Server for BSDI until year end :< Matthew Mung ---------------------------------------------------------------- Matthew Mung ^u^ | eConnect Network Manager | Smart Building Advanced Internet Sevices Phone Language Inc. | www: http://www.econnect.net/ ---------------------------------------------------------------- eConnect Calgary eConnect Montreal eConnect Toronto 1-800-826-6137 1-800-826-6135 1-800-826-6131 ---------------------------------------------------------------- ShadowTech Enterprises <shadow@he.net> 次寫入到主題 <321E1027.58DB@he.net>... > O.K., I am just learning how unix based systems work but I am having a > problem and I just can't figure it out. I am reselling web site hosting > space on an internet server on which I have an account. I am setting up > accounts for other people as subdirectories to my account. I am trying > to write a file managing CGI script in Perl that will allow my customers > to access their account, change/create/move file and directories from a > web page without issuing them a username or password of their own. They > must operate totally under my username. So I have written the Perl code > that will authenticate them based on a username/password database in my > root directory. I have also written some code that will allow the user > to 'cd' 'cp' 'cdup' 'chmod' 'rm' 'mkdir' and 'rmdir' by checking the > input received and ensuring that only the files in that users > directories are modified. What I am weak on, is the access permission > structure of the BSD/OS system I am running on. The script runs fine for > 'cd' using the 'chdir' perl command, and but when I try to implement > 'chmod' using the perl command 'chmod' or a 'system' call or by using > backticks I do not get any result other than a permission denied error > for the perl command and oddly enough I get nothing at all when I use > system calls or backticks, in fact the script just keeps on running with > no effect. I've tried setting the permission on the script to 777 and > u+s, with no effect but I don't really know exactly what that's doing. > The other commands seem to have the same effect. (I got around it with > 'cp' by actually opening, reading, and then writing the file to another > file). Also, when I try to run the script from the shell (not from the > web) a system ('chmod 755 filename') gives me a different error, > something about an invalid file mode. Can someone please explain to me > what's going on. I think I have bits and pieces but not the whole story. > Can this be done? Does it have something to do with setuid? > > Any help will be appreciated, if you can, send me an e-mail or just > reply. > > Dave Hagewood > shadow@he.net >