Access Denied when deleting Folder


(Leigh) #1

Using Windows 10 (0.14.32) with Synctrayzor on a Laptop and Desktop and I keep getting this problem with Access Denied on some folders when deleting/moving.

Example Below, this is on the laptop.

Now as the user on the laptop, I can select the folders and delete them - but Syncthing can’t I’ve selected the top C:\Sync folder and make sure all the rest are not read-only plus the user has full control. All the FILES that were in the folders have been moved (File Versioning used), its just the empty folders that get left.

[4SDI5] 2017/07/14 16:22:21.471218 rwfolder.go:815: INFO: Puller (folder “Sync”, dir “Business\A_Electrical Work\1_Devis To be created\1242 Mike 2017\Old Info\1168 Mike - Water Mill\Work Pics\Email Pics”): delete: remove \?\C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike 2017\Old Info\1168 Mike - Water Mill\Work Pics\Email Pics: Access is denied.

[4SDI5] 2017/07/14 16:22:21.475220 rwfolder.go:815: INFO: Puller (folder “Sync”, dir “Business\A_Electrical Work\1_Devis To be created\1242 Mike 2017\Old Info\1168 Mike - Water Mill\H_Info”): delete: remove \?\C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike 2017\Old Info\1168 Mike - Water Mill\H_Info: Access is denied.

[4SDI5] 2017/07/14 16:22:21.478723 rwfolder.go:815: INFO: Puller (folder “Sync”, dir “Business\A_Electrical Work\1_Devis To be created\1242 Mike 2017\Old Info\1168 Mike - Water Mill\Work Pics”): delete: remove \?\C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike 2017\Old Info\1168 Mike - Water Mill\Work Pics: Access is denied.

Any thoughts

BTW. Also still have the 100% problem between these 2

Leigh


(Adam Piggott) #2

It might sound obvious, but check to see if the folder (and its parents) are set as Read-Only. I won’t say I’ll eat my hat if they’re not…but I’ll chew on it.


(Leigh) #3

Yep - First thing I checked, right click on top folder, properties and select read-only is blank and apply to folder and sub files.

Thanks for the reply

Leigh


(Adam Piggott) #4

Are you running Syncthing using a different user account or as a Windows service?

Might be worth checking the Syncthing logs in case there’s more verbose information in there.

Sysinternals Process Monitor might throw some light on the situation as it’ll be able to show what file system operations are being attempted and the result.


(Leigh) #5

Both machines are using SyncTrazor to run Syncthing, and both are running as the users (Both users have local admin rights to there own machines) As the user on the laptop, I can use explorer and just delete the files, SyncTrazor or Syncthing Can’t

ProcessMonitor gave the following A couple of CANNOT DELETE’s

19:36:40.0955882	syncthing.exe	11984	FileSystemControl	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill	SUCCESS	Control: FSCTL_READ_FILE_USN_DATA
19:36:40.0959964	syncthing.exe	11984	CreateFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Work Pics	IS DIRECTORY	Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:36:40.0961597	SyncTrayzor.exe	10964	CreateFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
19:36:40.0962567	SyncTrayzor.exe	10964	QueryEAFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	
19:36:40.0963379	syncthing.exe	11984	CreateFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Work Pics	SUCCESS	Desired Access: Read Attributes, Delete, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
19:36:40.0963645	SyncTrayzor.exe	10964	QueryNetworkOpenInformationFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	CreationTime: 16/07/2017 16:00:11, LastAccessTime: 16/07/2017 16:00:11, LastWriteTime: 16/07/2017 19:36:40, ChangeTime: 16/07/2017 19:36:40, AllocationSize: 01/01/1601 02:00:01, EndOfFile: 01/01/1601 02:00:01, FileAttributes: ANCI
19:36:40.0964111	SyncTrayzor.exe	10964	CloseFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	
19:36:40.0964816	syncthing.exe	11984	QueryAttributeTagFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Work Pics	SUCCESS	Attributes: RD, ReparseTag: 0x0
19:36:40.0965436	syncthing.exe	11984	SetDispositionInformationFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Work Pics	CANNOT DELETE	Delete: True
19:36:40.0966099	syncthing.exe	11984	CloseFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Work Pics	SUCCESS	
19:36:40.0969910	SyncTrayzor.exe	10964	CreateFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
19:36:40.0970908	SyncTrayzor.exe	10964	QueryEAFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	


19:36:40.1047864	SearchIndexer.exe	2008	FileSystemControl	C:	SUCCESS	Control: FSCTL_READ_USN_JOURNAL
19:36:40.1049039	syncthing.exe	11984	TCP Receive	ses-HP:8384 -> ses-HP:65065	SUCCESS	Length: 0, seqnum: 0, connid: 0
19:36:40.1050784	syncthing.exe	11984	CreateFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Scans	IS DIRECTORY	Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:36:40.1054791	SyncTrayzor.exe	10964	TCP TCPCopy	ses-HP:65141 -> ses-HP:8384	SUCCESS	Length: 379, seqnum: 0, connid: 0
19:36:40.1054894	SyncTrayzor.exe	10964	TCP Receive	ses-HP:65141 -> ses-HP:8384	SUCCESS	Length: 379, seqnum: 0, connid: 0
19:36:40.1055342	syncthing.exe	11984	TCP Send	ses-HP:8384 -> ses-HP:65141	SUCCESS	Length: 379, startime: 26564539, endtime: 26564539, seqnum: 0, connid: 0
19:36:40.1056788	SyncTrayzor.exe	10964	CreateFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
19:36:40.1057898	SyncTrayzor.exe	10964	QueryEAFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	
19:36:40.1059097	SyncTrayzor.exe	10964	QueryNetworkOpenInformationFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	CreationTime: 16/07/2017 16:00:11, LastAccessTime: 16/07/2017 16:00:11, LastWriteTime: 16/07/2017 19:36:40, ChangeTime: 16/07/2017 19:36:40, AllocationSize: 01/01/1601 02:00:01, EndOfFile: 01/01/1601 02:00:01, FileAttributes: ANCI
19:36:40.1059583	SyncTrayzor.exe	10964	CloseFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	
19:36:40.1061215	syncthing.exe	11984	CreateFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Scans	SUCCESS	Desired Access: Read Attributes, Delete, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
19:36:40.1063296	syncthing.exe	11984	QueryAttributeTagFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Scans	SUCCESS	Attributes: RD, ReparseTag: 0x0
19:36:40.1064089	syncthing.exe	11984	SetDispositionInformationFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Scans	CANNOT DELETE	Delete: True
19:36:40.1064747	syncthing.exe	11984	CloseFile	C:\Sync\Business\A_Electrical Work\1_Devis To be created\1242 Mike Stage 2 Water Mill 2017\Old Info\1168 Mike - Water Mill\Scans	SUCCESS	
19:36:40.1065531	SyncTrayzor.exe	10964	CreateFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
19:36:40.1066543	SyncTrayzor.exe	10964	QueryEAFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	
19:36:40.1067481	SyncTrayzor.exe	10964	QueryNetworkOpenInformationFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	CreationTime: 16/07/2017 16:00:11, LastAccessTime: 16/07/2017 16:00:11, LastWriteTime: 16/07/2017 19:36:40, ChangeTime: 16/07/2017 19:36:40, AllocationSize: 01/01/1601 02:00:01, EndOfFile: 01/01/1601 02:00:01, FileAttributes: ANCI
19:36:40.1067872	SyncTrayzor.exe	10964	CloseFile	C:\Users\ses\AppData\Roaming\SyncTrayzor\logs\SyncTrayzor.log	SUCCESS	

Leigh


(Audrius Butkevicius) #6

To me it seems the directory is owned by a different user.

Right-click on the dir, properties, verify read only not set, security tab, check access given to “Everyone” and your user.


(Leigh) #7

Went up one level to “1_Devis To be created” and added eveyrone to have full control. - No change

Note - setting the “read only” - this (only applies to FILES in folder) under windows

Leigh


(Jakob Borg) #8

Maybe the directory has a custom icon or there’s something else in it?


(Leigh) #9

Thanks Jakob - Spot on :grinning:

Set Icon’s to default and all but one folder was removed. The last one was a copy of a Dropbox folder, change the Icon to default and it still would not delete.

Found a hidden desktop.ini file and when I deleted the ini file the folder finally got deleted.

I know I could have just deleted the folders but I’ve have this happen a few times and wanted to find out what was going on. I sometimes get empty folders hanging around when I rename one - I get an empty old named folder and also the correct named folder with all the files. Assume this happens when making changes halfway though a sync.

Could do with a separate utility/tool that can be run to show in detail why Syncthing has a problem with a file/folder - the debug option is a bit like “too much wood to see the trees” - Something for us mere users

Leigh


(Audrius Butkevicius) #10

I wonder why a custom icon would prevent removal?


(Jakob Borg) #11

(Leigh) #12

The Dropbox folder I can understand having a custom Icon, but the original “Devi” folders came from a DVD backup, so maybe the files/folders would have been read-only but they would have had standard icons. I un-flagged the read-only but that only works with the files under windows. Anyway can Syncthing at least indicate that there’s a desktop.ini file or have a “select one/all the folders below” to manual delete type window ?

Leigh


(Jakob Borg) #13

Maybe a (?d)desktop.ini ignore pattern handles this situation.


(Leigh) #14

Tried a few tests

Added //—Windows-Specific—//

(?d)desktop.ini (?d)Thumbs.db

To Desktop AND Laptop .stignore files in top Sync folder Restarted Syncthing on both machines

Test 1 On Desktop, D:\Sync created “New folder”, appears on Laptop

Desktop - Added a txt file in new folder, appears on Laptop

Desktop - Change icon to computer (Pros/Customize/Change Icon) Desktop as new icon, Laptop keeps old

Desktop - Delete “New Folder” Laptop syncs fine.

Test 2 Same as above but this time Deleted "New Folder on Laptop !

Desktop - txt file deleted in New Folder but New Folder not deleted and the Icon goes back to normal (After explorer refresh)

Desktop folder appears to contain no hidden files but Syncthing gives the error below (Multiple Times).

[BDVRV] 16:51:22 INFO: Puller (folder “Sync”, dir “New folder”): delete: remove \?\D:\Sync\New folder: Access is denied.

Leigh

BTW - How do you enter a carriage return without an extra line feed ?


(system) #15

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.