Partitions mounted in /media/data/[name] are auto-shared and rw-accessible from Windows

Hi, I just discovered what looks like a massive “oh shit” situation…

I’m dual booting Manajro and Win10, auto-mounting the NTFS Windows partitions. When connected to my work LAN, I see an entry "media on " in another machine’s Windows Explorer. Clicking on that, I end up in Manjaro’s /media, having read and write access to both mounted Windows partitions without any security hurdles.

Here’s etc/fstab that auto-mounts the Windows partitions:

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=C8E6-56EF                            /boot/efi      vfat    umask=0077 0 2
UUID=18e86a2a-299b-4c2d-81b4-cb540c817a68 swap           swap    defaults,noatime 0 2
UUID=2ac777f8-ef41-4109-9299-ac528f4969bf /              ext4    defaults,noatime 0 1
UUID=f1add496-7fdd-42ee-beef-d222f88d0ab9 /home          ext4    defaults,noatime 0 2
UUID=8E86ECBB86ECA545   /media/data/winsys      ntfs-3g nofail,noatime,rw,user,uid=1000,gid=1000,dmask=022,fmask=133,windows_names,auto 0 0
UUID=8E50B7A150B78F09   /media/data/windata     ntfs-3g nofail,noatime,rw,user,uid=1000,gid=1000,dmask=022,fmask=133,windows_names,auto 0 0

I could use some help finding out how to turn off sharing of my /media directory completely, couldn’t find anything in terms of that here on the forums.

PS: sharing was never turned on, so I don’t quite understand why or how /media got network shared in the first place.

Thanks in advance!

At some point you have set up a samba share on your Manjaro system.

Check your samba config in /etc/samba/smb.conf or disable and remove samba completely.

1 Like

I never touched samba since installing Manjaro some months ago, but I checked anyway: etc/samba/smb.conf does not exist. There’s only a file called private in that folder and that’s empty (except for some comments).

Removing the samba package didn’t change anything either - didn’t reboot yet though.

EDIT: reboot didn’t change a thing, so I guess it wasn’t related to samba.

Hmm - one thing I know for sure - shares does not appear by themselves.

Manjaro does not deploy any kind of file shares as part of an installation - so - at some point you have created the share.

The only thing Manjaro do provide is the tools. Any kind of sharing is setup by the user - so you need to back trace in what aspects you have changed the default Manjaro installation.

Some changes can be written off immediately like themes etc.

If you restart your system and don’t log in - then test if the share is accessible from the LAN.

If it is not - you know you have an application launched when you login - which shares the media folder. If you are using KDE - which I am not - and not nothing about - you may have activated a setting in Dolphin which shares the media folder.

1 Like

Thanks for your replies. I went and had another look at KDE - nothing shows up in system settings, or anywhere actually.

Then I checked KRDC out of curiousity, that’s the KDE RDP client I’m using to connect to the remote Windows machine. Turns out that there’s is an option in there (of all places…) that’s causing this exact behaviour as a feature: it’s called “Share Media” and defaults to /media which is why I kept swearing I never touched anything.

…well, I guess you learn something new every day :confused:

1 Like

I think that is a so called convenience setting - as in most cases only removable media is mounted to /media and have such removable device exposed through RDP is a quite useful feature.

I am a strong advocate to mount local partitions in a separate /data structure and what you experienced would be in favor of choosing such structure for internal partitions. :slight_smile:

Good you found it - and I learned something too - about KDE - most unexpected I must say.

1 Like

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