Re: chmod help
Hi! E.L. Meijer Eric ([EMAIL PROTECTED]): [EMAIL PROTECTED] (Default Debian Reader) | | How can i change the perms on a directory so that a file that is copied into that directory is automatically owned by another user and group? Don't know if anyone mentioned it already, but you can actually do this for the group ownership. If you do a `chmod g+s dir', new files created in this directory will get the same group. Hmm, do you have an idea how to deal with an anonFTP like incoming directory, too? This dir is direct accessible and (the big problem) the guy to sort all this stuff will (hopefully) never get root. I made a diaradm group and added this guy to it. Then made the dir sgid diradm. guy has to cp things to its new location to change owner. drawbacks - luser xyz does chgrp xyz subdir and guy is locked out :-( - cp may have some problems when space becomes limited and its SLOW compared to a mv (on the same partition) Do I need to write somethind suid root which guy can run (like chown -R guy dir )? Rainer -- KeyID=58341901 fingerprint=A5 57 04 B3 69 88 A1 FB 78 1D B5 64 E0 BF 72 EB
chmod help
How can i change the perms on a directory so that a file that is copied into that directory is automatically owned by another user and group?
Re: chmod help
[EMAIL PROTECTED] (Default Debian Reader) | | How can i change the perms on a directory so that a file that is copied into that directory is automatically owned by another user and group? You can't. Two suggestions: * Use chown -R to change ownership of all files i a directory * Write a shell function (cp) that just copies normally but copies and changes owner and group if the destination is that directory (if you're really desperate ;-) -- .elOle.
Re: chmod help
[EMAIL PROTECTED] (Default Debian Reader) | | How can i change the perms on a directory so that a file that is copied into that directory is automatically owned by another user and group? You can't. Two suggestions: * Use chown -R to change ownership of all files i a directory * Write a shell function (cp) that just copies normally but copies and changes owner and group if the destination is that directory (if you're really desperate ;-) Don't know if anyone mentioned it already, but you can actually do this for the group ownership. If you do a `chmod g+s dir', new files created in this directory will get the same group. HTH, Eric -- E.L. Meijer ([EMAIL PROTECTED]) | tel. office +31 40 2472189 Eindhoven Univ. of Technology | tel. lab. +31 40 2475032 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax+31 40 2455054
Re: chmod help
On Mon, 7 Sep 1998, E.L. Meijer (Eric) wrote: : : [EMAIL PROTECTED] (Default Debian Reader) : | : | How can i change the perms on a directory so that a file that is copied into that directory is automatically owned by another user and group? : [ snip ] : Don't know if anyone mentioned it already, but you can actually do this : for the group ownership. If you do a `chmod g+s dir', new files : created in this directory will get the same group. In fact, this is why Debian uses usergroups rather than catch-all groups like users - the default umask can be set so that your private files in your home directory are indeed private, but files in a shared project directory (take /usr/local/src as an example) can be editted by anyone in group src, provided /usr/local/src has permissions 2775. I hated usergroups when I started using Debian, until I figured out what they were for. Now I find them quite useful. -- Nathan Norman MidcoNet 410 South Phillips Avenue Sioux Falls, SD mailto:[EMAIL PROTECTED] http://www.midco.net finger [EMAIL PROTECTED] for PGP Key: (0xA33B86E9)