This discussion is locked
Greg Willits

Q: mount_afp error

X Server 10.4.3, client system 10.4.3

Can't get mount_afp to work. Here's what I've done:

- OS X Server at 192.168.0.10
- created a folder /srvrfolder at HD root
- made /srvrfolder/ a share point with o=dude g=staff
- verified via Finder that it mounts fine

- in Terminal on the client machine
% mkdir /volumes/srvrfolder/
% mount_afp afp://dude:pswd@192.168.0.10/srvrfolder/ /volumes/srvrfolder/

I get this response:
% mount_afp: the mount flags are 0000 the altflags are 0020
% mount_afp: AFPMountURL returned error -5023, errno is -5023

If I list

% ls /volumes/srvrfolder/

then indeed it is empty (yes, it has files).

I've tried a gajillion other little options, slashes, no slashes, chown/chmod variations.

Every google hit says those two simple lines above are supposed to work. For me, it doesn't.

Help??

-- greg




Xserve DP1.0GHz   Mac OS X (10.4.3)  

Xserve DP1.0GHz, Mac OS X (10.4.3)

Posted on Dec 9, 2005 5:23 PM

Close

Q: mount_afp error

  • All replies
  • Helpful answers

  • by R.Cerny,Helpful

    R.Cerny R.Cerny Dec 10, 2005 11:51 AM in response to Greg Willits
    Level 4 (1,170 points)
    Dec 10, 2005 11:51 AM in response to Greg Willits
    Did you try to search for the error number?
    -5023 afpUserNotAuth AFP User not authorized

    btw, if you're connecting from outside, you should create a ssh tunnel first, than connect to tunneled connection
  • by Roger Smith3,Helpful

    Roger Smith3 Roger Smith3 Dec 10, 2005 4:31 PM in response to Greg Willits
    Level 6 (13,475 points)
    Dec 10, 2005 4:31 PM in response to Greg Willits
    In the Unix world, volumes can only be mounted/unmounted by root. Your prompt indicates that you're a regular user when your doing the mount, so you should be getting permission denied. Try prefacing your command with sudo and see what happens. The syntax of what you were typing looks okay to me.

    Roger
  • by Greg Willits,

    Greg Willits Greg Willits Dec 10, 2005 8:22 PM in response to R.Cerny
    Level 1 (81 points)
    Dec 10, 2005 8:22 PM in response to R.Cerny
    Did you try to search for the error number?
    -5023 afpUserNotAuth AFP User not authorized


    Sure did, couldn't find any resource for error codes. Where are you finding this?

    btw, if you're connecting from outside, you should
    create a ssh tunnel first, than connect to tunneled
    connection


    Sure. One step at time
  • by Greg Willits,

    Greg Willits Greg Willits Dec 10, 2005 8:41 PM in response to Roger Smith3
    Level 1 (81 points)
    Dec 10, 2005 8:41 PM in response to Roger Smith3
    Your prompt indicates that you're a regular user


    Sorry, my inaccuracy, I guess I should have used $ in my sample.

    Try prefacing your command with sudo and see what happens.


    Right, been using sudo, and same results. So maybe something's not right with the volume I'm trying to mount? But, I can use Finder/Connect To server and use the same dude:pswd user credentials to get the volume mounted on the Desktop, so I would think my shared volume is OK.
  • by Greg Willits,

    Greg Willits Greg Willits Dec 10, 2005 8:55 PM in response to Roger Smith3
    Level 1 (81 points)
    Dec 10, 2005 8:55 PM in response to Roger Smith3
    OK, a little further along, my password had a % character, and that's apparently a problem (needst to be escaped in the CL I guess). I eliminated that character, and now I get

    mount_afp: AFPMountURL returned error -5019, errno is 2

    So, if I can get a lead on where these error codes are defined, I could maybe get it figured out.
  • by Greg Willits,

    Greg Willits Greg Willits Dec 10, 2005 9:20 PM in response to Greg Willits
    Level 1 (81 points)
    Dec 10, 2005 9:20 PM in response to Greg Willits
    oh brother. I forgot to change my path back to the real one (not the one in my sample).

    It appears from the beginning the problem has been the % character in the password.

    I'd still appreciate a tip on where error codes are defined, but thanks for the help which kept me focused on authentication issues.

    -- greg
  • by Leland Wallace,

    Leland Wallace Leland Wallace Dec 16, 2005 5:36 PM in response to Greg Willits
    Level 3 (643 points)
    Dec 16, 2005 5:36 PM in response to Greg Willits
    yes, the url portion needs to be a properly escaped url as well as one that the shell can handle (the ';' char is tricky).

    mount_afp sometimes returns old carbon error codes which can be found in:
    /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framewor k/Headers/MacErrors.h


    the -5019 error most likely means that the username was not accepted.

    HTH
    - Leland