xaq Posted August 10, 2021 Share Posted August 10, 2021 Today I randomly stumbled upon a folder that I could not view within a samba share. I could access to everything in the same level inside the same share just not this folder. Then i logged in with ssh and did a `ls -lha` in the folder to see: drwxrwxrwx 1 nobody users 4.0K Jul 21 19:34 ./ drwxrwxrwx 1 nobody users 84 Aug 10 01:30 ../ drwxrwxrwx 1 kali users 270 Jul 31 11:31 201005/ drwxrwxrwx 1 nobody users 4.0K Aug 10 01:18 201006/ drwxrwxrwx 1 nobody users 4.0K Jul 31 11:33 201007/ drwx------ 1 root root 136 Jun 30 01:22 201008/ drwxrwxrwx 1 nobody users 83 Nov 27 2016 201009/ drwxrwxrwx 1 nobody users 335 Nov 27 2016 201010/ drwxrwxrwx 1 nobody users 4.0K Nov 27 2016 201012/ drwxrwxrwx 1 nobody users 305 Sep 6 2017 201101/ drwxrwxrwx 1 nobody users 4.0K Nov 27 2016 201102/ drwxrwxrwx 1 nobody users 4.0K Nov 27 2016 201104/ drwxrwxrwx 1 nobody users 61 Nov 6 2016 201105/ drwxrwxrwx 1 nobody users 4.0K Nov 27 2016 201106/ drwxrwxrwx 1 nobody users 4.0K Nov 27 2016 201107/ drwxrwxrwx 1 nobody users 4.0K Dec 10 2020 201109/ ..... as you can guess the folder I could not access to is 201008 and for some reason its owner/group is root/root. Changing the owner/user of this folder via cli fixed my issue, but my question is can anyone think how this folders owner/user moved to root? And also there is another folder with owner: kali (which is my user I use from windows to login to smb) Can I do something to prevent this happening in the future? Quote Link to comment
itimpi Posted August 10, 2021 Share Posted August 10, 2021 This typically happens when you copy something locally within the server (e.g. using cp, mc, rsync or krusader container) rather than across the network and have not made sure to keep permissions unaltered. In such a case using Tools->New Permissions can correct the issue. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.