If someone gets unwanted remote access to my computer/OS, what's to prevent them from opening a terminal and changing the permissions on my files?

I have a FW that is very good, but, let's assume someone hijacked the browser and they got remote access. I don't want them to be able to delete or modify the files. There's no password for opening a terminal. Can I put a password on the terminal? Can the hijacker open a terminal and make changes?

I do not have a password on accessing the local OS and I don't know how to put one on. The only passwords I have are for admin to desktop and FW.

Debian stretch; orangepi, fw

  • Which OS? And what kind of remote access? It seems you speak about Unix, in which case only the owner of a file can change its permissions. So local or remote access by UserX does not allow it to change permissions on files owner by UserY. Otherwise, obviously, permissions would be worthless. Jun 11, 2019 at 23:39
  • Thanks PM. Debian OS. "unwanted remote access" like if someone hijacked my browser. I'm not familiar with unix vs linux - I think of it all as linux as I'm a novice. If someone sits in front of my computer they can open a terminal and change permissions. How is that different for a remote user? If the terminal required a password to be opened, it would make sense to me, but it doesn't. I don't see how to protect against in person or remotely, other than for "in-person" to have a password on my OS so they can't get in in the first place.
    – sgu55
    Jun 11, 2019 at 23:48
  • If someone has physical access ("someone sits in front of my computer") many security measures (like classical unix permissions) become worthless. The problem is not that the security measures are useless per se, just that someone has physical access to your box, which means a completely different set of constraints to fullfil (someone can open it, take the hard disk and plug it elsewhere and inspect it as they wish... of course full disk encryption would thwart that specific attack). Why do you think there are screensavers running automatically after X minutes and asking for password? Jun 11, 2019 at 23:53
  • "Why do you think there are screensavers running automatically after X minutes and asking for password?" Yes, I understand what you mean. For this computer, I don't have that. I'll have to see how to do it. But for remote access, since there is no password for a terminal, what prevents a remote user from doing the same thing as someone sitting in front of my computer (assuming no screensaver)? Thanks.
    – sgu55
    Jun 11, 2019 at 23:55
  • The only passwords that I have are for the desktop and FW "root privileges". I don't see how to create a password that prevents physical access to the screen and its contents. My skills are limited to the command line, assuming I know what the command is.
    – sgu55
    Jun 12, 2019 at 0:00

1 Answer 1


If you own the file then you can pretty much do anything with it and filesystem permissions won't stop you.

Permissions such as "000" aren't designed to protect you from yourself, it's to protect files from other people using the same system. So if you have one person who logs in as 'user1' and another who logs in as 'user2' then filesystem permissions can restrict access.

"000" can be useful for "oops, I made a mistake" type scenarios

$ echo hello > test
$ chmod 0 test
$ echo there > test
-ksh: test: cannot create [Permission denied]
$ rm test
rm: remove write-protected regular file 'test'? n

But it's not enough to stop you from doing things if you really try

$ rm -f test
$ ls -l test
ls: cannot access 'test': No such file or directory

But, in practice, permissions such as '000' aren't so useful and you rarely see them.

  • Last part won't happen if the directory is itself 000. But then files wouldn't be created in it either... Jun 12, 2019 at 3:32
  • When I assigned them "000", the file had a big red X on it = no access allowed. Thanks to both PM and SH, but I still don't know if a hijacker can access my files - open a new terminal and change permissions....?
    – sgu55
    Jun 12, 2019 at 5:52
  • Actually, after rereading above, it is clear that a hijacker can access my files as they are not there as a 2nd user; I don't see any reason why they wouldn't be able to change permissions either. And if they can do anything I can, then they can open a terminal, but not in root, unless I am in root. I thought I had heard that a remote attacker can "not" open a terminal when on my computer. But, based on above comments, I'm assuming that is false. Is that false? Thanks.
    – sgu55
    Jul 21, 2019 at 15:04

You must log in to answer this question.

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