Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Bash Command
Iynx
post Apr 26 2003, 01:54 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 26-April 03
Member No.: 734



What's the bash command to make a file on a linux websurver writable by everyone. It's chmod something, but what are the numbers?


-Iynx


--------------------
I like mine with lettuce and tomato, Heinz 57 and french patato, big kocher pickel and a cold draft bear, good god almight, which way do I steer for my, ChessBurger in paradise.
user posted image
Go to the top of the page
 
+Quote Post
digitalturbulenc...
post Apr 26 2003, 06:59 PM
Post #2


Whats this Lie-nix Thing?
*

Group: Members
Posts: 21
Joined: 5-April 03
Member No.: 633



QUOTE (Iynx @ Apr 26 2003, 06:54 PM)
What's the bash command to make a file on a linux websurver writable by everyone. It's chmod something, but what are the numbers?


-Iynx

chmod 666 your_file

But be carefull, some users could abuse about this right.

To calculate yourself the values:

1 execute
2 read
4 write

so if we want for the user only read and write, I make: 2 + 4 = 6
if we want the same for the group and the others, it will be at the end: 666
if you want also executable attribute, then it's: 777


--------------------
Free disposable email addresses to
stop spam mails!
Try it: TrashMail.net
Go to the top of the page
 
+Quote Post
Iynx
post Apr 30 2003, 10:55 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 26-April 03
Member No.: 734



What would the code be then to secure it?


-Iynx


--------------------
I like mine with lettuce and tomato, Heinz 57 and french patato, big kocher pickel and a cold draft bear, good god almight, which way do I steer for my, ChessBurger in paradise.
user posted image
Go to the top of the page
 
+Quote Post
Joey
post May 9 2003, 08:18 AM
Post #4


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



How do I view/change permissions on files/directories?
There are 3 different attributes a file can have that make up the permissions for the file.
There is read access that allows users to read the file.
There is write access that allows users to modify the file.
There is executable access that allows users to execute the file.

From these three attributes, you now have three different levels of permissions, the first being for the owner of the file, the second being for the group the file belongs to and the third being all other users on the system.

To view the current permissions on files and directories run the following command:
ls -l and you should see something that looks like:


drwxrwxr-x 3 joey html 4096 Sep 12 2000 images/
-rw-rw-r-- 1 joey html 267 Aug 8 12:55 index.shtml


The above shows you that images is a directory (d) and that the owner and group (joey html) have read ®, write (w) and execute (x) permissions while other users on the system only have read ® and execute (x) permissions.
For the index.shtml file, it shows joey and html as the owner and group and they both have read and write access to the file. It also shows that other users on the system only have read access. Note there is no executable permission since the file is not an executable.

To modify the permissions on a file, you either have to own it or be logged in as root. To modify the permissions, in a terminal type:
chmod xxx filename/directory
You will have to replace the xxx flags with the permissions you wish to change. You can either go by the numerical value or by the actuals. For more information, in a terminal, type man chmod

http://www.linuxhelp.ca/newbies/
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 15th December 2017 - 01:35 AM