Title: chmod tweak
Last modified: August 18, 2016

---

# chmod tweak

 *  [drdougfir](https://wordpress.org/support/users/drdougfir/)
 * (@drdougfir)
 * [22 years, 6 months ago](https://wordpress.org/support/topic/chmod-tweak/)
 * I wish this worked for me BUT my university feels its not in their best interest
   to turn chmod(); on for all of us kiddos. However, maybe someone else will find
   this useful?
    open wp-admin/b2template.php go to line 120 paste this chmod ($
   file, 0766); in place of echo “<input type=\”button\” name=\”oops\” class=\”search\”
   value=\”(you cannot update that file/template: must make it writable, e.g. CHMOD
   766)\” tabindex=\”2\” />”; unfortionately, this is the error i get. Warning: 
   chmod failed: Operation not permitted in /nfs/raven/u1/v/vanbossd/public_html/
   wp-admin/b2template.php on line 120 stupid university. can anyone tell me if 
   there’s another chmod function that i could try? its just plain annoying to have
   to go and ftp into the server every time i want to chmod something.

Viewing 1 replies (of 1 total)

 *  Thread Starter [drdougfir](https://wordpress.org/support/users/drdougfir/)
 * (@drdougfir)
 * [22 years, 6 months ago](https://wordpress.org/support/topic/chmod-tweak/#post-23994)
 * I think this might work too if you put it in the same spot BUT it appears to 
   require php 5 CVS according to [php.net](http://www.php.net/manual/en/function.ftp-chmod.php)
   
   again, my university servers wont run it. anyone have success with this? btw,
   i’m rather new to php coding so please excuse my mistakes etc. $ftp_server = “
   severname”; $ftp_user_name = “username”; $ftp_user_pass = “password”; $ftp_dir_name_going
   = “used if you have to get to httpdoc or public_html or whatever”; // set up 
   basic connection $conn_id = ftp_connect($ftp_server); // login with username 
   and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);//
   check connection if ((!$conn_id) || (!$login_result)) { echo “FTP connection 
   has failed!”; echo “Attempted to connect to $ftp_server for user $ftp_user_name”;
   exit; } else { echo “Connected to $ftp_server, for user $ftp_user_name”; } echo”
   <br>”; //change directory echo “Current directory : “, ftp_pwd($conn_id), “\n”;
   if (@ftp_chdir($conn_id, $ftp_dir_name_going)) { echo “Current directory is now:“,
   ftp_pwd($conn_id), “\n”; } else { echo “Couldn’t change directory\n”; } //trying
   to chmod somethign ftp_chmod($conn_id, 0766, $file); // close the FTP stream 
   ftp_close($conn_id); echo”<br>”; echo “ftp closed”;

Viewing 1 replies (of 1 total)

The topic ‘chmod tweak’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [drdougfir](https://wordpress.org/support/users/drdougfir/)
 * Last activity: [22 years, 6 months ago](https://wordpress.org/support/topic/chmod-tweak/#post-23994)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
