Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #361389
    gw1500se
    Participant

    I have a script that does an afp_mount of a volume for users. I have one user (of whom I am aware) that gets an errno 2 when trying to mount that volume. The odd part is that I can mount the volume using Finder connect with the same username and password. I am sure it is not a security issue but I cannot find what is different with this user then from those that work. Does anyone have any suggestions what this error is and how to go about shooting this bug? TIA.

    #361624
    gw1500se
    Participant

    I need to reserect this problem as now I have several users that have it. I do have a little more information that might be helpful.

    First there is an error with the errno. The error is -5019. It would be a big help if someone can tell me where to look up these errors.

    Second, I noticed that when I use the finder connect function to mount the same volume it is successful. However, the auto-created mount point has a ‘-1’ suffix on it. The only time I have seen that is when 2 volumes with the same name are used. The implication is that it thinks there is a volume with that name already there (that may be what the error -5019 is trying to tell me) and unlike the finder connect, I specify a specific volume in the afp_mount command.

    Assuming that is true for now, then somewere there must be a file that tells afp what is mounted and that file must be corrupt or write protected. Does anyone know what/where that file is so I can fix it? TIA.

    #361626
    andrina
    Participant

    So, the error -5019 is an “afpParmErr” (I found this here).

    In english afpParmErr = Miscellaneous parameter error (usually invalid user name). From what you’re saying with your mount points showing up with a “-1” on the end of them, check out the contents of /Volumes – you may find note in there of mountpoints that aren’t actually mounted on the client machine – remove these, and try your script again.

    #361627
    gw1500se
    Participant

    Thanks for the reply. If only it were that simple. There is no mounted volume with the same name (visible) that would cause the “-1” prefix to be added. There must be, either a hidden mount with that name that is auto-mounted even after a reboot (nearly impossible, IMO) or some peice of information kept somewhere (that can survive reboots) that is incorrect and/or corrupt.

    #361630
    andrina
    Participant

    I may not have been clear earlier – either use the “Go to Folder” menu item in the finder, or in Terminal go to /Volumes and have a look at the contents (/Volumes is not normally visible in the Finder). If you have nothing mounted through command+k the only thing you should see in there is your mounted local hard drives.

    For example, with no mounted volumes I have the following:

    andrina:~ andrina$ cd /Volumes/
    andrina:/Volumes andrina$ ls -al
    total 8
    drwxrwxrwt    3 root  admin   102 May 11 10:49 ./
    drwxrwxr-t   38 root  admin  1394 May 10 16:17 ../
    lrwxr-xr-x    1 root  admin     1 May 10 08:56 Macintosh HD@ -> /
    
    
    #361631
    gw1500se
    Participant

    Thanks. I know what you meant. I’m more a Unix guy then OS X anyway. Smile

    #361634
    andrina
    Participant

    Next place to look would be clearing out the mcx_cache in netinfo then – check out /config/mcx_cache and if there’s an mcx_cache at the root of the netinfo db.

    #361635
    gw1500se
    Participant

    Rats!!! You had my hopes up. I’m afraid it didn’t help. Cry

    #361642
    gw1500se
    Participant

    Thanks. This is in the user’s startup items list. It works for some users but not others. At one time it worked for all users but as time goes on it stops working for more and more users.

    #!/bin/sh
    #
    # This script mounts the email archive volume for the user
    #
    
    user=`logname`
    usertrunc=`echo $user|cut -c1-12`
    if [ ! -d "/Volumes/$usertrunc on EMAIL-ARCHIVE" ] ; then
    	mkdir "/Volumes/$usertrunc on EMAIL-ARCHIVE"
    fi
    if [ ! -f ~/Library/Mail/Mailboxes/Archive.mbox ] ; then
    	ln -s "/Volumes/$usertrunc on EMAIL-ARCHIVE/Archive.mbox" ~/Library/Mail/Mailboxes/Archive.mbox
    fi
    mount_afp -o nobrowse "afp://$user:xxxxxxxx@email-archive/$usertrunc EMAIL-ARCHIVE" "/Volumes/$usertrunc on EMAIL-ARCHIVE"
    if [ ! -d "/Volumes/$usertrunc on EMAIL-ARCHIVE/Archive.mbox" ] ; then
    	mkdir "/Volumes/$usertrunc on EMAIL-ARCHIVE/Archive.mbox"
    fi
    
    
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

Comments are closed