Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by kce, 84104, voretaq7 Oct 31 '13 at 6:03

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – voretaq7
  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – kce, 84104
If this question can be reworded to fit the rules in the help center, please edit the question.

    
it's not suppose to say anything it's *NIX (it only tells you when something went wrong) –  alexus Oct 30 '13 at 21:51
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
    
Thank you for your help. –  user2833135 Oct 30 '13 at 22:12
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.