-1

In order to CHMOD 777 a file, am I using the command correctly?

chmod 777 /var/www/html/core/database/connect.php

I am trying to use it, but it isn't saying anything... like no error or not saying that is was a success.

Just so you know, I am on a VPS with CentOS 6 (64 bit).

Thanks in advance.

1
  • it's not suppose to say anything it's *NIX (it only tells you when something went wrong)
    – alexus
    Oct 30, 2013 at 21:51

1 Answer 1

3

The command appears correct. Many unix utilities only provide feedback in the event of a failure. To be sure that the command worked or not you can check that the exit status is 0 or use ls to see what the file permissions are now.

For the first way, you can check the status a couple ways.

  • chmod 777 /var/www/html/core/database/connect.php ; echo $?
  • chmod 777 /var/www/html/core/database/connect.php && echo 'it worked'

To check the file permissions, just run ls -l /var/www/html/core/database/connect.php

Please remember though that with 777 permissions any user can read, change, and excecute the file.

0

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