Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > Programming Articles
How to CHMOD
TTG's Avatar
TTG
Join Date: May 2004
Posts: 1,042

 

Sth London
Show Printable Version Email this Page Subscription
TTG TTG is offline 08-12-2005, 10:00 PM

In various ReadMe files for hacks on Vbulletin.org one may see instructions such as CHMOD 777 a specific file or folder.

Permissions (Or CHMODs as the Linux term) is just the Linux way of assigning "who is allowed to do what".

First you will need to get yourself a good FTP client like CuteFTP or WS_FTP (they allow permissions/CHMODs visually) although you can use SSH and type in commands for CHMODding files and folders manually. For CuteFTP and FTP Pro you simply need to right-click the uploaded file or folder in the remote window and click Properties/CHMOD. You should see a box where you can type a number and a a bunch of tick boxes near it.

A CHMOD is a number, it references reading, writing, execution and group access of a file or folder.

In these three digit CHMOD numbers the first digit indicates the permissions for the owner, the second is the permissions for other members of the same "group" as the owner and third is the permissions for "others", aka the public at large.

You might also find permissions specified in rwx format (r= Read, w= Write, x =eXecute), ex: 600 = -rw-rw-rw-

In the three-digit number format the individual numbers are derived by adding up the permissions with 1=execute, 2=write and 4=read (read, write and execute = 4+2+1 -> 7)

0 = no permissions (---)
1 = execute only (--x)
2 = write only (-w-)
3 = write and execute (-wx)
4 = read only (r--)
5 = read and execute (r-x)
6 = read and write (rw-)
7 = read, write and execute (rwx)
644 (-rw-r--r--) = "I don't mind if other people can read this file, however only I should be able to run or write to/edit it"

755 (-rwxr-xr-x) = "I don't mind if other people can read or run this file, however only I should be able to write to/edit it"

777 (-rwxrwxrwx) = "Anybody can do anything they want (read, run, modify) with this file"

Permissions can be modified in a number of ways:

Using an FTP client such as WS_FTP LE or CuteFTP
Using the CHMOD command in a shell (SSH) session
Using your host's website control panel
Reply With Quote
  #2  
Old 07-19-2007, 06:29 PM
Haddaway Haddaway is offline
 
Join Date: Jun 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #3  
Old 07-21-2007, 11:11 PM
blazingpc's Avatar
blazingpc blazingpc is offline
 
Join Date: Sep 2006
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://www.ss64.com/bash/chmod.html" target="_blank">This may also help</a> for those who may not get it, Theres a flash chmod box to get your numbers until you are familiar with it.

Nice job on this BTW!!!
Reply With Quote
  #4  
Old 04-23-2008, 08:14 PM
Jasem's Avatar
Jasem Jasem is offline
 
Join Date: Feb 2006
Location: www.menokia.com
Posts: 594
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
Reply With Quote
  #5  
Old 12-18-2009, 03:14 AM
rsalumpit's Avatar
rsalumpit rsalumpit is offline
 
Join Date: Aug 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this.

may i ask you what are the least folders/files i need to give a CHMOD777 ?
and the rest should be what at least 644?
Reply With Quote
  #6  
Old 12-20-2009, 03:04 PM
Black Tiger's Avatar
Black Tiger Black Tiger is offline
 
Join Date: Apr 2004
Location: Netherlands
Posts: 957
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
may i ask you what are the least folders/files i need to give a CHMOD777 ?
Only those that are said to make 777, this could be a directory for a hack/mod like the downloads directory for Downloads II or the modules directory for vBAdvanced.
Normaly 777 is -not- needed.

Next to that it depends on the security installed on the server of your host. If he's using php-cgi with phpsuexec you can't make a directory 777 and in that case it must be made 755.

On windows based servers, security goes another way, there is no chmod.
Reply With Quote
  #7  
Old 06-16-2011, 12:29 AM
DrackosNGU DrackosNGU is offline
 
Join Date: Jun 2011
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TTG View Post
In various ReadMe files for hacks on Vbulletin.org one may see instructions such as CHMOD 777 a specific file or folder.

Permissions (Or CHMODs as the Linux term) is just the Linux way of assigning "who is allowed to do what".

First you will need to get yourself a good FTP client like CuteFTP or WS_FTP (they allow permissions/CHMODs visually) although you can use SSH and type in commands for CHMODding files and folders manually. For CuteFTP and FTP Pro you simply need to right-click the uploaded file or folder in the remote window and click Properties/CHMOD. You should see a box where you can type a number and a a bunch of tick boxes near it.

A CHMOD is a number, it references reading, writing, execution and group access of a file or folder.

In these three digit CHMOD numbers the first digit indicates the permissions for the owner, the second is the permissions for other members of the same "group" as the owner and third is the permissions for "others", aka the public at large.

You might also find permissions specified in rwx format (r= Read, w= Write, x =eXecute), ex: 600 = -rw-rw-rw-

In the three-digit number format the individual numbers are derived by adding up the permissions with 1=execute, 2=write and 4=read (read, write and execute = 4+2+1 -> 7)

0 = no permissions (---)
1 = execute only (--x)
2 = write only (-w-)
3 = write and execute (-wx)
4 = read only (r--)
5 = read and execute (r-x)
6 = read and write (rw-)
7 = read, write and execute (rwx)
644 (-rw-r--r--) = "I don't mind if other people can read this file, however only I should be able to run or write to/edit it"

755 (-rwxr-xr-x) = "I don't mind if other people can read or run this file, however only I should be able to write to/edit it"

777 (-rwxrwxrwx) = "Anybody can do anything they want (read, run, modify) with this file"

Permissions can be modified in a number of ways:

Using an FTP client such as WS_FTP LE or CuteFTP
Using the CHMOD command in a shell (SSH) session
Using your host's website control panel
what should i chmod my files to? i want the site as secure as possible but i'm not sure what needs to stay as 777 and what i can change
Reply With Quote
  #8  
Old 12-21-2011, 10:26 PM
wayne.richards@ wayne.richards@ is offline
 
Join Date: Jul 2008
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DrackosNGU View Post
what should i chmod my files to? i want the site as secure as possible but i'm not sure what needs to stay as 777 and what i can change
same here, in 4.1.9
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04294 seconds
  • Memory Usage 2,261KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete