Permission issue / Access denied running windows batch file against smb share.

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Permission issue / Access denied running windows batch file against smb share.

      I have an SMB share in OMV that is a mapped drive in windows. I have a user (Jerry) in omv that is the same name and password as my user in windows. I am trying to run a scheduled task in windows against all of the files of the mapped drive. I get a access denied error if any of the files are owned by the user Jerry. I have to change ownership of a file to nobody to be able to run my windows script against it. I thought that if I had the usernames the same with the same password, my windows user would have access to the files?
    • - Can you add or delete files, in the SMB share, from the Windows machine that is logged in with the user Jerry?
      - Where is the actual batch file itself? Is it on the Windows machine or is it in the SMB share?

      If adding Windows Usernames + passwords to OMV, they must be an exact match, Cap's and all.

      There's a couple layers of permissions involved.
      First, I wouldn't use ACL's (This is the top half of the permissions window where permissions are set by user name).

      In the base shared folder, the "users" group would need read/write and make check that the associated SMB share is not configured for "Read Only".
      ____________________________________________________________________

      Try this statement in Extra Options, of the SMB share you're working with.

      write list = @users

      Video Guides :!: New User Guide :!: Docker Guides :!: Pi-hole in Docker
      Good backup takes the "drama" out of computing.
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      OMV 4.1.13, Intel Server SC5650HCBRP, 32GB ECC, 16GB USB boot, UnionFS+SNAPRAID
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk
    • What does the batch file do? (Create, copy, paste, delete, rename, etc.)

      Video Guides :!: New User Guide :!: Docker Guides :!: Pi-hole in Docker
      Good backup takes the "drama" out of computing.
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      OMV 4.1.13, Intel Server SC5650HCBRP, 32GB ECC, 16GB USB boot, UnionFS+SNAPRAID
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk
    • Thinking about it, if the batch file is being executed as a scheduled task in Windows, the user account being used (for the task) might not be "Jerry". It might be "Administrator" or "System".

      In Task Scheduler, look at the Task's properties. In the General Tab, under Security Options, select the user Jerry and "Run only when the user is logged on" to see if that works. If it works, you could try the option to run the task when not logged on.
      ___________________________________________________________________________

      Alternately, you could try enabling the hidden Administrator account in WIndows, set a password, and add Administrator as a Linux user in OMV.

      Video Guides :!: New User Guide :!: Docker Guides :!: Pi-hole in Docker
      Good backup takes the "drama" out of computing.
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      OMV 4.1.13, Intel Server SC5650HCBRP, 32GB ECC, 16GB USB boot, UnionFS+SNAPRAID
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk
    • When I saw the source of your script, that was going to be the next suggestion; run it on OMV. :)
      It's good that you're set.

      Video Guides :!: New User Guide :!: Docker Guides :!: Pi-hole in Docker
      Good backup takes the "drama" out of computing.
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      OMV 4.1.13, Intel Server SC5650HCBRP, 32GB ECC, 16GB USB boot, UnionFS+SNAPRAID
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk