Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Script problem



Jeff,
 
    Thanks to the tip below I found the problem.
 
    If I mounted the volume in a login script I couldnt see the files and folders contained in the volume even though the volume mounted successfully. However, if I used the same login info from a terminal session I could see the contents. I ended up fixing it by changing the permissions on all the contents to Everyone read only and the folder of the volume to administrators full access. Strange but fixed the problem. Its like after the volume was mounted it forgot what it had access too when running as a login script.
 
 
    Sound familiar?
 
 
Dedrick
 


From: Jeff Ochsner [mailto:email@hidden]
Sent: Sunday, July 23, 2006 11:12 PM
To: Allen, Dedrick
Cc: email@hidden
Subject: Re: Script problem

Is this on 10.3 or 10.4 clients (or both)?

Jeff

On Jul 21, 2006, at 2:24 PM, Allen, Dedrick wrote:


From: Jeff Ochsner [mailto:email@hidden]
Sent: Friday, July 21, 2006 12:13 PM
To: Allen, Dedrick
Cc: email@hidden
Subject: Re: Script problem

I would add this to the second line of your script, and then try logging in again.  Then, hop into /tmp and open the out file to see where it is failing.

set -xv; exec 1>>/tmp/out 2>&1

Jeff

On Jul 21, 2006, at 9:02 AM, Allen, Dedrick wrote:

I have a login script that automatically mounts a volume and copies down a couple of files to the local HD. When the script runs it is mounting the afp volume fine but absolutely refuses to copy the files to the machine. Here is the piece of the script.

mkdir -p /Library/Scripts/Custom
mkdir /Volumes/Software\ Update\ Scripts       
mount_afp afp://xs.intranet.com/Software\ Update\ Scripts /Volumes/Software\ Update\ Scripts
cp /Volumes/Software\ Update\ Scripts/softwareupdate.sh /Library/Scripts/Custom/
chmod u+x /Library/Scripts/Custom/softwareupdate.sh    
cp /Volumes/Software\ Update\ Scripts/com.intranet.softwareupdate.plist /Library/LaunchDaemons/
umount -f /Volumes/Software\ Update\ Scripts


I don’t see any reason why this copy doesn’t work during logon. I took the same code and pasted into a shell session and it worked fine. Just refuses to work as a login script. Anybody seen this?


Thank you for your time


Dedrick

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 
Jeff, thanks for the tip. I did this and it revealed that there was a permissions problem copying the file. I am specifying a username and password that has full access to this volume but for some reason after I mount the volume I cant access it when doing this in a login script. If I use the same shell commands from a terminal session it all works fine. I did a little more debugging and had it ls the files in the volume to a file and nothing is in the file meaning it seems that it doesnt have access to see any of these files. but again the user i am mounting with has full access to this volume.
 
 
Dedrick
 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/client-management/email@hidden

This email sent to email@hidden

References: 
 >Re: Script problem (From: Jeff Ochsner <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.