Announcement

Collapse
No announcement yet.

Cannot save file in shared folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cannot save file in shared folder

    Hi. My apologies if this issue was discussed hundred times.

    Got fresh installed Kubuntu on Ubuntu 22.04.3 LTS.
    Have a host in local nework under Win7 with shared folders. These folders are visible in Dolphin and I able to copy files there via Dolphin.

    Also I mounted them in fstab:

    //192.168.0.99/D/Temp /home/flash/torrents/ cifs credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=07 77,dir_mode=0777 0 0
    //192.168.0.99/D /home/flash/Media/ cifs credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=07 77,dir_mode=0777 0 0

    While I'm saving any file from application to the mounted folder - it's ok, but when I'm trying to save to shared folder I'm receiving an error. Opera and Firefox say "Remote files not accepted - Portal / You can only select local files", LibreOffice says "Error saving document Object not accessible. The object cannot be accessed due to insufficient user rights".

    Why this is happening? Where I can check these rights? I gave credentials to Samba and it's fine via Dolphin.

    Thanks in advance!

    just in case - smb.conf:
    [global]

    name resolve order = bcast host lmhosts wins
    workgroup = MYGROUP
    server string = %h server (Samba, Ubuntu)
    log file = /var/log/samba/log.%m
    max log size = 1000
    logging = file
    panic action = /usr/share/samba/panic-action %d
    server role = standalone server
    obey pam restrictions = yes
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    map to guest = bad user

    [printers]
    comment = All Printers
    browseable = no
    path = /var/spool/samba
    printable = yes
    guest ok = no
    read only = yes
    create mask = 0700

    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers
    browseable = yes
    read only = yes
    guest ok = no​

    #2
    What exactly do you mean by "mounted folder" vs. "shared folder" ?

    The Opera/Firefox issue might be addressed here.


    As far as LibreOffice this solution was offered elsewhere on the web. I have not tried it as I do not have your issue:

    In LibreOffice, go to Tools > Options... > Advanced > Open Expert Configuration.
    In the search bar enter "uselocking".
    Double-click on "true" to toggle it to "false".
    Then click "OK" twice and try again.

    Please Read Me

    Comment


      #3
      Originally posted by Garpusha View Post
      Opera and Firefox say "Remote files not accepted - Portal / You can only select local files",
      This will be a feature/setting from Snap or Flatpak.
      For Snaps, read this for different methods and tools to allow network access, or outside of your home directories.,
      For Flatpak, you can install Flatseal to change access permissions for that.

      Originally posted by Garpusha View Post
      //192.168.0.99/D /home/flash/Media/ cifs credentials=/root/.smbcredentials,noperm,iocharset=utf8,file_mode=07 77,dir_mode=0777 0 0
      Why is your credentials file in the root user account's home (/root/)?? This may be the whole issue here, since it can't be read unless you are logged in as root. Which is not normally available in *buntu to begin with.
      Last edited by claydoh; Sep 25, 2023, 10:38 AM.

      Comment


        #4
        Originally posted by oshunluvr View Post
        What exactly do you mean by "mounted folder" vs. "shared folder" ?
        I have shared folder on another LAN PC. I can access it via file manager like Dolphin smb://my_host/my_folder or mount it using mnt /my_local_folder /remote_folder bla-bla


        Originally posted by oshunluvr View Post
        The Opera/Firefox issue might be addressed here.
        I'm afraid the issue is not with Opera or FF because even LibreOffice cannot work with it. It's kind of system issue i suppose. The way you offered with Libre configuration did not work unfortunately.

        Comment


          #5
          Originally posted by claydoh View Post
          This will be a feature/setting from Snap or Flatpak.
          For Snaps, read this for different methods and tools to allow network access,
          For Flatpak, you can install Flatseal to change access permissions for that.


          Why is your credentials file in the root user account's home (/root/)?? This may be the whole issue here, since it can't be read unless you are logged in as root. Which is not normally available in *buntu to begin with.
          Actually did not get your point but will read it carefully later, thanks.


          Originally posted by claydoh View Post
          Why is your credentials file in the root user account's home (/root/)?? This may be the whole issue here, since it can't be read unless you are logged in as root. Which is not normally available in *buntu to begin with.
          Well, I tried to put credentials to my home folder and change path in fstab - nothing changed.

          Comment


            #6
            Originally posted by Garpusha View Post
            Actually did not get your point but will read it carefully later, thanks.
            Applications installed as Snaps or Flatpak very often need permissions set to allow access to directories not in the user's home dir -- Firefox most certainly is a Snap.

            Originally posted by Garpusha View Post
            Well, I tried to put credentials to my home folder and change path in fstab - nothing changed.
            Is it readable? You may need to chmod it to 600 if you simply copied it over, especially if you are using a root account to do so.
            You can aslo test the username/password by specifyiing them directly in the fstab instead of using a file, for testing purposes.

            You may just have problems with share permissions, or the fstab entry, but samba always has been a pain for me.

            Does it work any differently using the Network folder on Dolphin's sidebar, instead of manually mounting or using the fstab?

            Originally posted by Garpusha View Post
            I have shared folder on another LAN PC. I can access it via file manager like Dolphin smb://my_host/my_folder or mount it using mnt /my_local_folder /remote_folder bla-bla

            I would say that you need to look at the settings and permissions used for this share and match that to your Win 7 settings, particularly the SMB protocol version used there. if it is using SMB version 1 (highly insecure) it will not be supported out of the box.

            Comment


              #7
              Originally posted by Garpusha View Post
              I have shared folder on another LAN PC. I can access it via file manager like Dolphin smb://my_host/my_folder or mount it using mnt /my_local_folder /remote_folder bla-bla
              OK, so this is confusing because any folder is a mounted folder. "shared folder" or "networked folder" vs. "local folder" would have been more clear. SMB mounts are mounted folders. The difference isn't mounted vs. not-mounted., it's local vs. shared.

              Please Read Me

              Comment


                #8
                Sorry for the pause, was tired of Linux)

                Originally posted by claydoh View Post
                Applications installed as Snaps or Flatpak very often need permissions set to allow access to directories not in the user's home dir -- Firefox most certainly is a Snap.
                Will check, ok

                Originally posted by claydoh View Post
                Is it readable? You may need to chmod it to 600 if you simply copied it over, especially if you are using a root account to do so.
                You can aslo test the username/password by specifyiing them directly in the fstab instead of using a file, for testing purposes.
                You may just have problems with share permissions, or the fstab entry, but samba always has been a pain for me.
                Yes it's readable and it's being mounted fine and it works - to save to mounted network folder.

                Originally posted by claydoh View Post
                Does it work any differently using the Network folder on Dolphin's sidebar, instead of manually mounting or using the fstab?
                Yes, I cannot save via sidebar links or using network folder.​

                Originally posted by claydoh View Post
                I would say that you need to look at the settings and permissions used for this share and match that to your Win 7 settings, particularly the SMB protocol version used there. if it is using SMB version 1 (highly insecure) it will not be supported out of the box.
                Yes, it's definitely permissions issue, I just tried to save a picture from KolourPaint via Dolphin network shortcuts and it worked. Seems I have to investigate this.

                Thanks for your time.

                Comment


                  #9
                  Originally posted by Garpusha View Post
                  Yes, it's definitely permissions issue, I just tried to save a picture from KolourPaint via Dolphin network shortcuts and it worked. Seems I have to investigate this.
                  It sounds like Snap or Flatpak application permissions, except maybe for Libreoffice.
                  Browsers as snap/flatpak usually have restricted filesystem access by default.
                  See my first post.

                  You can tell from this:

                  Click image for larger version

Name:	Screenshot_20230925_124240.png
Views:	150
Size:	152.8 KB
ID:	674152

                  Comment


                    #10
                    Originally posted by claydoh View Post

                    It sounds like Snap or Flatpak application permissions, except maybe for Libreoffice.
                    Browsers as snap/flatpak usually have restricted filesystem access by default.
                    See my first post.

                    You can tell from this:

                    Yes, it's correct, Opera is installed via Snap. I tried to plug some connections which could be related to network (you see "manual" mark), no changes:
                    Click image for larger version

Name:	Screenshot_20230925_221305.png
Views:	147
Size:	74.6 KB
ID:	674154
                    One more interesting point. I have installed Smb4k to check my connections, so Smb4k can see my mounted network folders but see no other hosts at all. I wonder could it be the reason or not.

                    Click image for larger version

Name:	Screenshot_20230925_221741.png
Views:	145
Size:	91.6 KB
ID:	674155

                    Comment

                    Working...
                    X