Re: Possible to reset Linux file permissions w/in webcat [shell] ?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35520
interpreted = N
texte = WebCat runs under Linux as a non-priveledged user, so there are lots of things that you cannot do directly using [SHELL]. It is, however, possible to use a SUID script to do the file permission/ownership changes. Have your sys admin create a script to chmod/chown the files, then flag it as SUID: chmod +s scriptnameI would recommend that the script should not accept any command line parameters; it is too dangerous. SUID script's run with the rights of the file's owner, not the user running the script. Hence you could have a script owned by root, that an unprivileged user could run.I have not written one yet (mostly because I AM the sysadmin), but the best design would be to have a directory structure parallel to the production files. So if your production files are in /home/http/htdocs/site1/...you should have a directory /home/youruser/htdocs/site/...and the script would copy the files to their real home, change the rights and ownership. I would recommend a script that simply copies all files from the current directory to the matching directory in the live system. Then you could move the script around to wherever you wanted to; there is no real reason to do this via WebCat at all.hope this gives you some ideas...John PeacockJohn Butler wrote: > > Linux , WC 3.08 > > Is it possible to reset file permissions within a webcat [shell] context? We are using > [shell] successfully for other things, but when my sys admin tried to make a template > which I can use to reset perms on other files without bothering him all the time, it > didn't work. Before I post code etc. I want to know if there is some reason why it > should *not* work in the first place (ie - security feature, etc). > > -John >------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (Gary Krockover 2000)
  2. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (Gary Krockover 2000)
  3. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (ShrPAUL1@aol.com 2000)
  4. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (ShrPAUL1@aol.com 2000)
  5. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (John Butler 2000)
  6. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (Bob Sneidar 2000)
  7. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (Bob Sneidar 2000)
  8. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (ShrPAUL1@aol.com 2000)
  9. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (John Butler 2000)
  10. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (ShrPAUL1@aol.com 2000)
  11. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (ShrPAUL1@aol.com 2000)
  12. Re: Possible to reset Linux file permissions w/in webcat [shell] ? (John Peacock 2000)
  13. Possible to reset Linux file permissions w/in webcat [shell] ? (John Butler 2000)
WebCat runs under Linux as a non-priveledged user, so there are lots of things that you cannot do directly using [shell]. It is, however, possible to use a SUID script to do the file permission/ownership changes. Have your sys admin create a script to chmod/chown the files, then flag it as SUID: chmod +s scriptnameI would recommend that the script should not accept any command line parameters; it is too dangerous. SUID script's run with the rights of the file's owner, not the user running the script. Hence you could have a script owned by root, that an unprivileged user could run.I have not written one yet (mostly because I AM the sysadmin), but the best design would be to have a directory structure parallel to the production files. So if your production files are in /home/http/htdocs/site1/...you should have a directory /home/youruser/htdocs/site/...and the script would copy the files to their real home, change the rights and ownership. I would recommend a script that simply copies all files from the current directory to the matching directory in the live system. Then you could move the script around to wherever you wanted to; there is no real reason to do this via WebCat at all.hope this gives you some ideas...John PeacockJohn Butler wrote: > > Linux , WC 3.08 > > Is it possible to reset file permissions within a webcat [shell] context? We are using > [shell] successfully for other things, but when my sys admin tried to make a template > which I can use to reset perms on other files without bothering him all the time, it > didn't work. Before I post code etc. I want to know if there is some reason why it > should *not* work in the first place (ie - security feature, etc). > > -John >------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Re2: frames & carts (1997) Redirect frame targets (1998) RAM variables (1997) Refresh cart# (1999) Prevent multiple appends with Reload Button (1997) [ShowNext] (1997) Re:Item options w/ price adjustment (1997) apostrophe in search item (1997) More than one db with the same namn (was: WC2f3) (1997) Encrypt broken on Mac 3.05b13?? (2000) Help formatting search results w/ table (1997) Limiting user access to .tmpl files (1997) Close Databases Crash? (1998) Web Catalog 2 demo (1997) WebCat editing, SiteGuard & SiteEdit (1997) Yosemite and 8.1??? (1999) GetChars and feature request (2002) Running _every_ page through WebCat ? (1997) Trigger Error (2001) Windows 2003 Web Edition and WebCatalog 6.0a Guide (2006)