• moosetwin@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 day ago

    I don’t really have a good memory, but I talked through it with some folks online and after 2 hours none of us could figure it out so I don’t think you’ll have much luck.

    The error I kept getting was mount error(13): Permission denied when trying to run

    sudo mount.cifs '//DESKTOP-N84OKKP/My Music/ -o username='*******',password='*******'
    

    (username and password redacted, but there was a space in the username and an ! in the password for the computer sharing the folder)

    Here’s what I tried:

    • Setting the username/password to those of either computer
    • Setting the UID (with uid=$UID)
    • Changing the name of the shared folder
    • Unsharing it and resharing it
    • Putting different parts of the command in quotes
    • Switching between left slashes and right slashes
    • Trying both sudo mount.cifs and sudo mount -t cifs
    • Various combinations of the above
    • Changing the security protocol with sec= (I don’t remember what to, I didn’t write this one down)

    I know the shared folder itself works, because I can access it from a non-linux computer.

    • Desyn0xox@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Dumb question here, but you did remember to point at a directory to mount the share to, right?

      Part from that, I’ve encountered needing to provide the domain as well (typically WORKGROUP) as the credentials for a user with access to the given share. Furthermore providing username and password on the command-line is known to have some issues, thus I encourage you to provide them in a credential file, which would look something like this:

      username=value
      password=value
      domain=WORKGROUP
      

      My typical command, changed for your case, would be:

      mkdir -p ~/mounted_music
      sudo mount -t cifs -o credentials=~/creds //DESKTOP-N840KKP/My\ Music ~/mounted_music
      

      Not sure I’ve encountered it myself, but some shares doesn’t support Unix Extensions which can be disabled with “nounix”, you might want to define access rights then either “rw” or “dir_mode=0777,file_mode=0777”. (0777 is not a good practice, but it’ll do for testing) thus something like the following options argument.

      -o credentials=~/creds,rw,dir_mode=0777,file_mode=0777,nounix
      
      • moosetwin@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        23 hours ago

        Dumb question here, but you did remember to point at a directory to mount the share to, right?

        Yeah, I forgot to make that a part of the comment, oops!

        I’ll try your other suggestions when I can.