Hello Perry, Thanks a lot for replying my mail again. Please find the answers of your questions below one by one.
--- On Thu, 8/21/08, Perry Smith <[EMAIL PROTECTED]> wrote: From: Perry Smith <[EMAIL PROTECTED]> Subject: Re: What is wrong with this script ?? To: [EMAIL PROTECTED] Cc: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]>, beginners@perl.org Date: Thursday, August 21, 2008, 6:57 PM I'm going to not CC beginners@perl.org after this point since I don't think this is a perl question right now. Please speak up if you want to be included in this thread. I'm not sure you understood my previous question. I was asking if such things as chgrp, chown, etc work from the shell -- not from perl. Two questions right now: 1) Does everything else work except the chgrp command? For example, does the chown work? (assuming you are logged in as root or you use sudo). yes, everything else worked fine, except for the chgrp command. The output of ls -l command si shown below: for a sample of 3 students, drwxr-xr-x 2 s08-1-5-095 root 4096 2008-08-20 22:19 s08-1-5-095 drwxr-xr-x 2 s08-1-5-096 root 4096 2008-08-20 22:20 s08-1-5-096 drwxr-xr-x 2 s08-1-5-097 root 4096 2008-08-20 22:17 s08-1-5-097 Initially, I manually made a directory in my system for testing the commands when I my perl script could not do for the same purpose. step 1. I create the homedirectories with mkdir s08-1-5-095 mkdir s08-1-5-096 mkdir s08-1-5-097 step2. I changed the ownership with the help of chown s08-1-5-095 /root/perl/s08-1-5-095 when I tried doing chgrp s08-1-5-095 /root/perl/s08-1-5-095 and others did nt work out. 2) Pick a user name that is in the LDAP server list s08-1-5-093 and do "id usersId" e.g. "id s08-1-5-093" .. let me see the results. the results of the "id userid" are as shown below: [EMAIL PROTECTED] ~]# id s08-1-5-097 uid=3053(s08-1-5-097) gid=3053 groups=3053 [EMAIL PROTECTED] ~]# id s08-1-5-098 id: s08-1-5-098: No such user [EMAIL PROTECTED] ~]# id s08-1-5-095 uid=3051(s08-1-5-095) gid=3051 groups=3051 [EMAIL PROTECTED] ~]# id s08-1-5-096 uid=3052(s08-1-5-096) gid=3052 groups=3052 [EMAIL PROTECTED] ~]# At this juncture, I would like to tell you that, my ldap server does the central authentication of the students logging into the any of the server machines, where they are supposed to work on their home directories, which is in this case -the cluster servers. the thing is that, at first i wrote one perl script, where the chgrp did nt work, and so i had been tryinng to do that manually too. Now i am reading a book, on that, to find out the fallacies/ faults etc, to find out the solution. If you have any solution do let me know. the rest part of your question, is not matching with my situation and so not answering them. The answer to the last pasrt of your question is shown below, where it shows that it is an invalid group. [EMAIL PROTECTED] perl]# mkdir tmp [EMAIL PROTECTED] perl]# cd tmp [EMAIL PROTECTED] tmp]# touch foo [EMAIL PROTECTED] tmp]# ls foo [EMAIL PROTECTED] tmp]# chown s08-1-5-097 chown: missing operand after `s08-1-5-097' Try `chown --help' for more information. [EMAIL PROTECTED] tmp]# chown s08-1-5-097 foo [EMAIL PROTECTED] tmp]# chgrp s08-1-5-097 foo chgrp: invalid group `s08-1-5-097' [EMAIL PROTECTED] tmp]# ls -l total 0 -rw-r--r-- 1 s08-1-5-097 root 0 2008-08-21 19:27 foo [EMAIL PROTECTED] tmp]# The users are probably all in the same group. I'm hoping the id command will give me that group. Some systems it will, others it will not. Lets suppose the output from id is something like this: uid=503(pedzan) gid=20(staff) groups=20(staff),103(com.apple.sharepoint.group.3),98(_lpadmin),102(com.apple.sharepoint.group.2),501(perry),101(com.apple.sharepoint.group.1) In this case the numeric value of the id is 503 and the numeric value of the group is 20. Find your values for one of your users. Then (as root) try this: cd /tmptouch foochown 503 foochgrp 20 fools -l foo (the 20 and 503 will be replaced with the numbers you have). See if the ls shows the proper owner/group. On Aug 21, 2008, at 2:04 AM, Jyotishmaan Ray wrote: Give some pointers as such to sort out this problem in my cluster servers (fedora-linux) ? --- On Thu, 8/21/08, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: From: Mr. Shawn H. Corey <[EMAIL PROTECTED]> Subject: Re: What is wrong with this script ?? To: "Perry Smith" <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED], beginners@perl.org Date: Thursday, August 21, 2008, 4:07 AM On Wed, 2008-08-20 at 17:25 -0500, Perry Smith wrote: > I would first verify that you can do what you need to do with one > individual directory from the shell. i.e. make sure you can chown, > chgrp, and chmod -- what ever other commands you are needing to do. On many *NIX systems, commands like chown and chgrp are restricted so that you cannot steal quotas. Only sudo users can run them. -- Just my 0.00000002 million dollars worth, Shawn "Where there's duct tape, there's hope." Cross Time Cafe "Perl is the duct tape of the Internet." Hassan Schroeder, Sun's first webmaster