Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File on SMB gets invalid permissions when created in an observed folder #1080

Open
cmantsch opened this issue Oct 10, 2024 · 0 comments
Open

Comments

@cmantsch
Copy link

I have a SMB share mounted on a linux server (Server 1). On this server, a bash script that touches a .txt file is executed.

On a second linux server (Server 2), the same share is mounted and a python program is observing the directory using PollingObserver with PatternMatchingEventHandler for .txt files.

First time, the script runs fine, but second time it fails as follows:

user@server1:~$ cat test-heartbeat.sh
rm -f /mnt/mysmb/heartbeat.txt
touch /mnt/mysmb/heartbeat.txt
ls -l /mnt/mysmb/heartbeat.txt

user@server1:~$ sudo bash test-heartbeat.sh
-rwxr-xr-x 1 root root 0 Okt 10 09:35 /mnt/mysmb/heartbeat.txt

user@server1:~$ sudo bash test-heartbeat.sh
touch: cannot touch '/mnt/mysmb/heartbeat.txt': No such file or directory
ls: cannot access '/mnt/mysmb/heartbeat.txt': No such file or directory

user@server1:~$ ls -l /mnt/mysmb/heartbeat.txt
-rwxr-xr-x 1 root root 0 Okt 10 09:35 /mnt/mysmb/heartbeat.txt

user@server1:~$ sudo bash test-heartbeat.sh
touch: cannot touch '/mnt/mysmb/heartbeat.txt': No such file or directory
ls: cannot access '/mnt/mysmb/heartbeat.txt': No such file or directory

user@server1:~$ ls -l /mnt/mysmb/heartbeat.txt
ls: cannot access '/mnt/mysmb/heartbeat.txt': No such file or directory

Also, when checking the file properties on a windows machine, the file has invalid permissions (every access in this whole process is done using the same AD user on SMB):
Bildschirmfoto 2024-10-09 um 22 17 09

All of this only occurs when there is an active observer watching the directory and only for extensions in the specified patterns.

Is this some known issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant