Skip to main content
deleted 88 characters in body
Source Link
muru
  • 78.3k
  • 16
  • 214
  • 320

When I was studying the manual page for command pmount I read the following:

pmount ("policy mount") is a wrapper around the standard mount program which permits normal users to mount removable devices.

And when I used the following command

pmount /dev/sdc1

pmount /dev/sdc1 (without sudo) as a normal user, it created a folder named sdc1 in /media/media/sdc1 folder, while the permissions for the system's /media/media folder are

drwxr-xr-x

drwxr-xr-x and the user who owns this folderit is owned by rootroot. This means that a normal user (currently, me) cannot create files and folders in /media/media folder.
The question is: doesn't

Doesn't this contradict the rules of permissions and ownership in linuxLinux?

Another question is that while mountmount requires superuser permissions, and pmountpmount uses mountmount internally, how is it possible to use pmountpmount without sudosudo?

When I was studying the manual page for command pmount I read the following:

pmount ("policy mount") is a wrapper around the standard mount program which permits normal users to mount removable devices.

And when I used the following command

pmount /dev/sdc1

(without sudo) as a normal user, it created a folder named sdc1 in /media folder, while the permissions for the system's /media folder are

drwxr-xr-x

and the user who owns this folder is root. This means that a normal user (currently, me) cannot create files and folders in /media folder.
The question is: doesn't this contradict the rules of permissions and ownership in linux?

Another question is that while mount requires superuser permissions, and pmount uses mount internally, how is it possible to use pmount without sudo?

When I was studying the manual page for command pmount I read the following:

pmount ("policy mount") is a wrapper around the standard mount program which permits normal users to mount removable devices.

And when I used pmount /dev/sdc1 (without sudo) as a normal user, it created a folder named /media/sdc1 folder, while the permissions for the system's /media folder are drwxr-xr-x and it is owned by root. This means that a normal user (currently, me) cannot create files and folders in /media folder.

Doesn't this contradict the rules of permissions and ownership in Linux?

Another question is that while mount requires superuser permissions, and pmount uses mount internally, how is it possible to use pmount without sudo?

Source Link

How does command "pmount" work without "sudo"

When I was studying the manual page for command pmount I read the following:

pmount ("policy mount") is a wrapper around the standard mount program which permits normal users to mount removable devices.

And when I used the following command

pmount /dev/sdc1

(without sudo) as a normal user, it created a folder named sdc1 in /media folder, while the permissions for the system's /media folder are

drwxr-xr-x

and the user who owns this folder is root. This means that a normal user (currently, me) cannot create files and folders in /media folder.
The question is: doesn't this contradict the rules of permissions and ownership in linux?

Another question is that while mount requires superuser permissions, and pmount uses mount internally, how is it possible to use pmount without sudo?