1

I use Kali Linux and discovered the following "problem":

root@kali:/proc/self# ls -l cmdline
-r--r--r-- l root root 0 May 27 13:43 cmdline
root@kali:/proc/self# chmod 744 cmdline
chmod: changing permissions of `cmdline': Operation not permitted

I am not allowed to change the permissions of that file... but I am root? Why is that? Are there ways to work around this? I allready tried some things like moving the file (what is obviously not possible), change the runlevel etc.

1 Answer 1

1

/proc is pseudo-filesystem. In general it is not designated to allow user to chmod or mv its entries.

More info here.

The proc filesystem is a pseudo-filesystem which provides an interface to kernel data structures. It is commonly mounted at /proc. Most of it is read-only, but some files allow kernel variables to be changed.

5
  • ah ok, that explains it. But a program needs to copy this file, do you know any way around?
    – licklake
    Commented May 27, 2016 at 12:19
  • 1
    cp cmdline ~/foo -- should work as you can read the file. Have in mind that /proc/self is special, it refers to a program that accesses it. There is difference between cd /proc/self ; cat cmdline and cat /proc/self/cmdline. Try it. Commented May 27, 2016 at 12:32
  • Yes your right. But i still got the problem that the program is not mine and allready compiled... so its more of a softwarebug i guess
    – licklake
    Commented May 27, 2016 at 12:35
  • @licklake What program? Maybe we have XY problem here. Commented May 27, 2016 at 12:42
  • a metasploit function to pentest ftp servers
    – licklake
    Commented May 27, 2016 at 12:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .