-2

I need to protect my data in my home on cluster (ssh) by others. I would like via chmod to prevent others to enter (read and write) in that directory so that I only have permissions to enter, read and write files. Which is the best "chmod" combination to do this? I'm not able to do "sudo" and other admin instructions since I'm a simple user of the machine. I already made the folder hidden in this way: ./myfolder but to me is not sufficient since via ls -a it is visible.

Can anyone help me please?

Thanks in advance

B.

NewUsr_stat
  • 2,351
  • 5
  • 28
  • 38
  • Possible duplicate of [chmod - protect users' file being accessed so only owner can access?](https://stackoverflow.com/questions/28886936/chmod-protect-users-file-being-accessed-so-only-owner-can-access) – loudmummer Jun 04 '18 at 08:52

1 Answers1

1

I believe you need something like

chmod -R u+rw,go-rwX ~

Or

chmod -R 600 ~

which will give you read and write permissions but deny them to other users. Beware, however, that the root user can still access everything.

Visit this post on superuser. You will find all you need to know. Visit here and here to learn more about chmod and file security. But was there really a need to ask this question here? Possible duplicate?

loudmummer
  • 544
  • 3
  • 19