in reply to whoami?

I'm the one the posted this. I forgot to log in first. Sorry.

Anyway, thanks A LOT for the help. The part I am still stumped on is, the :nobody stuff.

I understand that the -R indicates that the Chown command should be repeated for all sub-directories. Is there an equivalant switch in Perl or will I need to write the recursion myself?

Also, again, what is the :nobody and how do I account for it in my script?

Thanks in advance for your help. Hopefully one day I'll actually know enough to be able to help someone else here.

Just, Kurious

Replies are listed 'Best First'.
Re: Re: whoami?
by AgentM (Curate) on Nov 21, 2000 at 01:56 UTC
    Both chmod and chown implement a recursive engine already, using, as you said, -R. I'm still curious as why you are changing the owner, though. Which user are you changing this from?
    AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.
      It looks to me more like he's simply trying to change the group. Giving the nobody group permission to view the folder, so that the Apache web server can see the stuff in there. Of course, that's assumption, not necessarily close to being right. <br
      If that is the case, I would suggest you use chgrp instead of chown, easier and gives a better error message (such as "You are not a part of the group nobody"). At least try this from the command line first, and see if that's what's causing the problem :-)
      OK, here's the scoop. The truth is am a Windows Java / C++ programmer, and I don't know very much about Perl and less about Unix.

      (Pause here for snicker and sneer break.)

      Now that you've gotten that out of your system. I've been trying to learn Perl and I'm in the process of putting together a Linux box, so maybe I'll actually be able to answer some questions here some day.

      However, in the meantime, I've got a friend that asked if I could help him automate some commands that he is having to type manually everytime he sets up a user on his web server. This is a script for priviliged users alone and not for the public at large.

      I believe I'm down to the last issue, thanks to all the help (and fast too!) I have gotten here. The last thing I have to do is implement the recursion by hand because it does not appear that the chown command actually supports the -R switch. If it does, I have not found documentation on it yet.

      So, I hope that kind of puts everything in perspective.

      BTW, why does my posting say I have a Reputation of 0? Is that because I'm all questions and no answers?

      Thanks again for all the help.

      Just,
      Kurious

Re: Re: whoami?
by Fastolfe (Vicar) on Nov 21, 2000 at 01:55 UTC
    Check the man pages for the Unix 'chown' command. If you specify a user:group, the GID of the file is set to 'group' (the part that follows the colon).

    If you want to do recursion, you should probably look into File::Find, which does all of that for you.