chmod – protect users’ file being accessed so only owner can access?

chmod 600 filename will do it;
or
chmod 700 if it is an executable.

Another way that is less cryptic is:

chmod go-rwx filename

  • The “g” is for group
  • The “o” is for others
  • The “-” is for removing permissions
  • The “r” is for read-permission
  • The “w” is for write-permission
  • The “x” is for execute permission.

For the sake of completeness:

  • “u” is for user / owner
  • “+” is for adding permissions

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)