File Sharing/Permissions Issue

FTP Server, File Server, DDNS, SAMBA, AFP, NFS
Post Reply
osuhickeys
Starting out
Posts: 27
Joined: Thu Mar 15, 2012 4:34 am

File Sharing/Permissions Issue

Post by osuhickeys » Fri Apr 09, 2021 6:28 am

I have a Windows 10 machine running Hyper-V. I am hosting an Ubuntu 20.04 VM that is running Docker. I created a user on the Qnap, added it to the admin group, and gave it read/write access to the share. I also have given guest read/write access. I have a drive from the Windows 10 machine mapped to the share as the user I created as well as have it mounted to the Ubuntu VM as the same user.

I have an app running in a container with the share mounted as a volume. The app takes a folder and the files (orig_dir) in it from the local C drive of the Windows 10 machine (also mounted to the Ubuntu VM and the container) and moves it to the Qnap share with a new folder name (tmp_dir). It then runs a script that does some processing of the files and creates a new folder on the Qnap share and puts the files in it (final_dir). The script is supposed to delete tmp_dir, but it is fails. I am not able to delete tmp_dir from Windows Explorer, the Ubuntu VM, or the container. Everything with final_dir works fine.

The permissions from Windows Explorer for tmp_dir look fine initially. If I try to delete it from Windows Explorer and then look at the permissions, I get you do not have permissions to view permissions on this object. The permissions show as 777 from the Ubuntu VM, the container, and from ssh to the Qnap. I am able to rename the tmp_dir folder from Windows Explorer, but I cannot delete it from Windows Explorer, the VM, or the container. I am not able to rename the files in that directory or delete them. I am able to delete the tmp_dir folder and files from SSH to the Qnap and Qnap File Manager.

Interestingly enough, if I reboot the Qnap, the tmp_dir folder and files disappear. I am running the latest version of the Qnap code (4.5.2.1630). I have also tried to use set_volume_mode. I have done chmod -R 777 * from the VM, the container, and the Qnap with no luck. Only did this as a last ditch effort to try and figure this out.

The permissions look correct at every level. Seems like there is corruption or a mismatch occurring somewhere throughout the process. Not sure what else to look at or try at this point.

The only other thing I can think of to try is to add ssh to the container and add code to the script to connect to the Qnap and delete tmp_dir. That may be a struggle as I am not sure how I would pass the variable from the script to the SSH session. Trying to avoid a hack as I think this should be working.

Post Reply

Return to “File Sharing”