Access Denied when backing up files

  • Hi I have OMV 6.9.11-3 on a raspberry pi 4 (32bit, OS Lite) that has been working well for over one year. I installed OMV using

    https://raspberrytips.com/openmediavault-on-raspberry-pi/). I use Goodsync to make my backups. The Goodsync setup uses smb/cifs to select the destination folders on my Raspberry Pi. I setup these folders as browserable and guest allowed so no passwords were needed. The setup has worked well. But two days ago it failed. The message output from Goodsync was:

    092052 L: Reading State File /Volumes/WD2 APFS/Documents After Jul17/Copilot POI file and PNG and merge it with the root state

    092052 L: Reading State File /Volumes/WD2 APFS/Documents After Jul17/French and merge it with the root state

    092055 R: Reading State File smbd://NAS/OMVWD2Docs/_gsdata_/_file_state_v4._gs

    092141 Changes: 4, Conflicts: 0, CopyTime: 0, FixState: 0, Errors: 0, All: 40363

    092141 Left to Right: Copy File: 4

    092141 -- Analysis Complete. Time 00:00:51, Speed: 354 files/s

    092141 Cannot upload log file: Copy to Temp: Access Denied (0xc0000022)


    So it seemed to be able to access all the required folders but then could not upload for some reason. I checked the RPi drives with sudo fsck and no errors appeared. I have asked Goodsync support about this Temp file and await their response. This is not a Goodsync error - it still works with my other backups that go to a WDMyCloud NAS. I think this error is due to something in the OMV folders. Much appreciate any thoughts/suggestions as re-installing and re-creating these backups is a long job. So any alternative fix would be great. Thanks!

  • chente

    Hat das Thema freigeschaltet.
    • Offizieller Beitrag

    092141 Changes: 4, Conflicts: 0, CopyTime: 0, FixState: 0, Errors: 0, All: 40363


    092141 Cannot upload log file: Copy to Temp: Access Denied (0xc0000022)

    Sounds to be as if the backup succeeded. Just the log file could not be uploaded.


    What is the target for the log file?

  • Hi thanks for the quick response. That's right I think Goodsync has succeeded in reading all the files in my OMV folder. I have asked Goodsync support about this log file but so far they have not responded.

    They believe I have not entered a user/password. I have replied explaining that the folder does not need this and when I leave them blank GS says the connection was successful. If I try user guest and no password it failed to connect which seems odd. If I open the folder in Finder it says I am connected as guest!

    I can drag a file from the OMV folder backup to my desktop and read it and then save to my local drive. But I cannot make an empty folder on my desktop and drag it to the OMV folder - that transfer is denied.

    So some odd results I feel. But why was GS working and then just fail?

    GS support also want me to make sure GS can use SMB1/2 as it cannot handle SMB3. I have set the minimum SMB to SMB1 in OMV SMB/CIFS settings but I stil get the error.

    What backup software do OMV users generally use? Thanks.

    • Offizieller Beitrag

    I never do backups for clients. All the information is hosted on the server and clients access the information from the server. I sync work files with Nextcloud.

  • Hi thanks for all the replies. I will check them out. The big advantage of GS seemed to be it would let me use a local network available folder and not require the use of cloud storage.

    Just one thing, it seems an unlikely solution but GS suggested I actually change the OMV settings to no guests and add a user/password, My OMV user is pi. If I change the OMV folder to no guest then when I try to set the OMV destination folder in GS I get the request for a password - if I add the admin user/password I get the message bad credentials.

    So where do I set the pi password for the folder?


    Thanks!

    • Offizieller Beitrag

    The big advantage of GS seemed to be it would let me use a local network available folder and not require the use of cloud storage.

    I don't use cloud storage for anything. I dedicate a local 4TB drive, to UrBackup, for client backups.

  • Hi thanks for the idea - I have tried urbackup but I am using a macbook with sonoma 14 and I could not see a server for macos. Did I miss something? The web site says I can install an OMV plugin but it looks like I need Docker. I am a bit unsure about my abiliity to do a radical switch!

    Is there a Macos backup software any likes?

    I am still trying to add a user/password to my OMV folders to see if GS works with that.

    Thanks!

  • Hi it seems there is a fundamental problem with write access to my OMV folders with SMB. I have changed the SMB/CIFS shares back to guests allowed and in Finder I can read the folders and download files. But I cannot drag a new folder into the directory. So there is some permission that is lacking. In terminal I can access the folder so I wondered if I could change the premissions there rather than in the OMV UI?

    I was thinking:

    chown -R pi:users /path/to/Folder/

    chmod -R 777 /path/to/Folder/


    I don't want to do anything that would wreck these folders so I thought I would check here first.


    Thanks!

  • I should have added that if in terminal I check with ls -al I see that these folders are only owned by root. I have searched the web re samba, permissions etc but it looks like I am at a dead end. For some reason on 1-Jan GS no longer had write access to the OMV folders. This seems to tie with the fact they are owned by root now. OMV does not let me change smb.conf and I do not have the superuser privileges to use chown or chmod.


    Any more suggections much appreciated but thanks for all your help!

    • Offizieller Beitrag

    I would not use Pi user and you cannot use the admin user.


    Create a new user in the GUI of OMV, than this user will be member of the group users with GID=100.

    Create a shared folder in the GUI of OMV and add give the new user read/write access to that folder.

    Add the folder to SMB service.


    If you insist on using the Pi user post the output of id pi and the full permission and ownership of the folder you want to use as target for GS.

    Did you add the GS folder to the SMB service in OMV and did you give the pi user read/write access to that shared folder in the GUI of OMV?


    Regarding permissions in general:

    misc_docs:nas_permissions [omv-extras.org]

    • Offizieller Beitrag

    The big advantage of GS seemed to be it would let me use a local network available folder and not require the use of cloud storage.

    I use UrBackup locally. For cloud storage I use Duplicati and restic. Both safe the backup encrypted, de-duplicated and versioned.

  • Hi thanks for this info and the ideas. Here is my id pi output:


    uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),104(input),106(render),108(netdev),111(ssh),999(spi),998(i2c),997(gpio)


    Here is the ls -al output of the folder I was trying to use for GS (I have several of them and they all seem read only now!):


    drwxr-xr-x 3 root root 262144 Apr 30 2023 .

    drwxr-xr-x 9 root root 262144 Jan 4 14:25 ..

    -rwxr-xr-x 1 root root 6148 Dec 15 17:20 .DS_Store

    -rwxr-xr-x 1 root root 4096 Apr 30 2023 ._.DS_Store

    -rwxr-xr-x 1 root root 4096 Apr 30 2023 '._CDs, Dell and Scanned Documents'

    -rwxr-xr-x 1 root root 4096 Apr 30 2023 '._Opera on 3 Dialogue of the Carmellites.m4a'

    -rwxr-xr-x 1 root root 4096 Apr 30 2023 '._Opera on 3 Dialogue of the Carmellites.wav'

    drwxr-xr-x 3 root root 262144 Apr 14 2023 'CDs, Dell and Scanned Documents'

    -rwxr-xr-x 1 root root 410081422 Jan 30 2023 'Opera on 3 Dialogue of the Carmellites.m4a'

    -rwxr-xr-x 1 root root 2471081980 Jan 30 2023 'Opera on 3 Dialogue of the Carmellites.wav'


    I made all the folders guest allowed in SMB/CIFS and also gave pi read/write under users permissions. I was just following the raspberry tips link I shared above re staying with pi. I did think about creating a new user but would I be able to transfer all the folders/files I have already on the disk to the new folder and give them write access?


    Thanks again!

    • Offizieller Beitrag

    You can add the pi user to the "users" group (GID=100)

    Then use the resetperms plugin to reset the permissions and ownership of the folders recursively to default. Folders should be owned by root:users

  • Hi macom thanks for this! I have pi user in users group. But I get stuck installing resetperms plugin. I need to run the wget command as root. In terminal I tried sudo wget -O - https://github.com/OpenMediaVa…ckages/raw/master/install | bash but I get:

    sudo wget -O - https://github.com/OpenMediaVa…ckages/raw/master/install | bash

    --2024-01-05 08:59:41-- https://github.com/OpenMediaVa…ckages/raw/master/install

    Resolving github.com (github.com)... 140.82.121.3

    Connecting to github.com (github.com)|140.82.121.3|:443... connected.

    HTTP request sent, awaiting response... 302 Found

    Location: https://raw.githubusercontent.…s/packages/master/install [following]

    --2024-01-05 08:59:41-- https://raw.githubusercontent.…s/packages/master/install

    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...

    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: 1869 (1.8K) [text/plain]

    Saving to: ‘STDOUT’


    - 100%[===================>] 1.83K --.-KB/s in 0s


    2024-01-05 08:59:42 (3.88 MB/s) - written to stdout [1869/1869]


    This script must be executed as root or using sudo.


    Apologies - I am not that expert with linux commands. What do I need to do?


    Thanks!

  • Ah! Thanks that worked. I went through the process of resetting permissions to default and the plugin worked but for each directory and file I get the error operation not permitted.


    Sorry for all these problems!


    In Users pi I have: adm, audio, cdrom, dialout, games, gpio, i2c, input, netdev, pi, plugdev, render, root, spi, ssh, sudo, users, video


    In Groups pi I have admin, pi, root


    These are the only user and group I have. Is there a mistake here?


    Thanks.

  • Not much - there is no notification of an error - below is copy/paste of the run screen:


    Changing owner to root:users ...
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/.DS_Store': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/._.DS_Store': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/Dell Files.7z': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/_gsdata_/2023-0415-094412-Fred'$'\342\200\231''s MacBook Air-OMV2Misc.log': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/_gsdata_/_file_state_v4._gs': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/_gsdata_/2023-0414-144011-Fred'$'\342\200\231''s MacBook Air-OMV2Misc.log': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/_gsdata_/_insync_v4.gsl': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/_gsdata_': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/Scanned Documents.zip': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/LX-2.zip': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents/CD Files.7z': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/CDs, Dell and Scanned Documents': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/._CDs, Dell and Scanned Documents': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/Opera on 3 Dialogue of the Carmellites.wav': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/._Opera on 3 Dialogue of the Carmellites.wav': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/Opera on 3 Dialogue of the Carmellites.m4a': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General/._Opera on 3 Dialogue of the Carmellites.m4a': Operation not permitted
    chown: changing ownership of '/srv/dev-disk-by-uuid-644B-8FA2/General': Operation not permitted

    END OF LINE


    If I check the folder using Finder on my mac get info says everyone as read/write access! So it seems to have worked in some sense. I still cannot drag a file to the directory. I am logged in as admin. Your help is vey much appreciated! It would be great to fix this problem.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!