Skip to main content
Formatting, minor phrasing tweak.
Source Link
Stephen Kitt
  • 482.8k
  • 60
  • 1.2k
  • 1.4k

Leaving aside the need for that, I was willingwanted to write (create a file) into /sys/devices/pci0000:00/{one-of-the-devices}//sys/devices/pci0000:00/{one-of-the-devices}/.

Running touch a returns touch: cannot touch 'a': Permission denied.
(I read somewhere that giving write permissions to the given folder is not enough - if one of the parent folders in the hierarchy does not have write permissions. I tested that and it does not seem to hold true.)

Anyway, I obviously tried using sudo and even impersonating as root user with sudo su root, but keep getting permission denied.

Does this there are folders in the file system that only kernel space is allowed to write to (as opposed to user space)  ? Perhaps virtual file systems that the OS refreshes/writes to intermittently  ? Perhaps the folder is a link and I do not know  ?

Leaving aside the need for that, I was willing to write (create a file) into /sys/devices/pci0000:00/{one-of-the-devices}/

Running touch a returns touch: cannot touch 'a': Permission denied.
(I read somewhere that giving write permissions to the given folder is not enough - if one of the parent folders in the hierarchy does not have write permissions. I tested that and it does not seem to hold true.)

Anyway, I obviously tried using sudo and even impersonating as root user with sudo su root, but keep getting permission denied.

Does this there are folders in the file system that only kernel space is allowed to write to (as opposed to user space)  ? Perhaps virtual file systems that the OS refreshes/writes to intermittently  ? Perhaps the folder is a link and I do not know  ?

Leaving aside the need for that, I wanted to write (create a file) into /sys/devices/pci0000:00/{one-of-the-devices}/.

Running touch a returns touch: cannot touch 'a': Permission denied.
(I read somewhere that giving write permissions to the given folder is not enough if one of the parent folders in the hierarchy does not have write permissions. I tested that and it does not seem to hold true.)

Anyway, I obviously tried using sudo and even impersonating as root user with sudo su root, but keep getting permission denied.

Does this there are folders in the file system that only kernel space is allowed to write to (as opposed to user space)? Perhaps virtual file systems that the OS refreshes/writes to intermittently? Perhaps the folder is a link and I do not know?

Source Link
Veverke
  • 378
  • 1
  • 4
  • 19

Are there specific folders in the file system that cannot be written to?

Leaving aside the need for that, I was willing to write (create a file) into /sys/devices/pci0000:00/{one-of-the-devices}/

Running touch a returns touch: cannot touch 'a': Permission denied.
(I read somewhere that giving write permissions to the given folder is not enough - if one of the parent folders in the hierarchy does not have write permissions. I tested that and it does not seem to hold true.)

Anyway, I obviously tried using sudo and even impersonating as root user with sudo su root, but keep getting permission denied.

Does this there are folders in the file system that only kernel space is allowed to write to (as opposed to user space) ? Perhaps virtual file systems that the OS refreshes/writes to intermittently ? Perhaps the folder is a link and I do not know ?