BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old January 12th, 2002, 09:41 PM
mizzory mizzory is offline
Webmaster - Trying
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 478 mizzory User rank is Lance Corporal (50 - 100 Reputation Level)mizzory User rank is Lance Corporal (50 - 100 Reputation Level)mizzory User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 5 h 24 m 52 sec
Reputation Power: 8
Send a message via ICQ to mizzory
Chmod

I tried looking at FreeBSD's page and a few others. I tried to do man chmod. I still cannot get how to change the permission...

Reply With Quote
  #2  
Old January 12th, 2002, 11:25 PM
Bob Loblaw Bob Loblaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Posts: 174 Bob Loblaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
chmod can change permissions of a file or directory
you could set rwx read,write,execute for users,group,and misc

chmod -R 777 mydir (will set it to rwx by world(all)
-R recursive
you probably don't want to set anything 777

Reply With Quote
  #3  
Old January 13th, 2002, 08:08 AM
mizzory mizzory is offline
Webmaster - Trying
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 478 mizzory User rank is Lance Corporal (50 - 100 Reputation Level)mizzory User rank is Lance Corporal (50 - 100 Reputation Level)mizzory User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 5 h 24 m 52 sec
Reputation Power: 8
Send a message via ICQ to mizzory
I did that and it says Operation Not Permitted... do I need to be logged in as the superuser? How to I switch to the superuser?

Reply With Quote
  #4  
Old January 13th, 2002, 08:11 AM
mizzory mizzory is offline
Webmaster - Trying
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 478 mizzory User rank is Lance Corporal (50 - 100 Reputation Level)mizzory User rank is Lance Corporal (50 - 100 Reputation Level)mizzory User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 5 h 24 m 52 sec
Reputation Power: 8
Send a message via ICQ to mizzory
I tried to edit rc.conf using ee but when I went to save it, it says unable to create file "/etc/rc.conf". Is this because of superuser or CHMOD?

Reply With Quote
  #5  
Old January 13th, 2002, 09:43 AM
Fjodor Fjodor is offline
Slacker
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Sweden
Posts: 76 Fjodor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Do you have the right to change filepermissions on the file you are trying to change? Probably not. Do an ls -l to see the filepermissions. You read left to right: Owners permissions (the one who created the file), Group permissions and then the others permissions.

So, you might see something like this:
Code:
-rw-r--r--    1 erik   users         128 Jun  6  2000 welcome.msg

Wich means, erik (the owner) has read and write permission to this file. The group users have the right to read the document, and the others have allso read permissions.
To illustrate: 'chmod o+r filename' give others (everyone) read permissions. 'chmod g-r filename' remove read permissions for the group, and finally 'chmod u+rwx filename' give the owner the right to read, write and execute the file. The operators + and - adds or takes away a permission. You can allso use = to make it the only setting. Say 'chmod u=rw,g=r filename' which would mean the setting will be user have rw and group has r and other have nothing, no matter what the rights where before the change

So when BSD check to see if you have right to change, it first look, are you the owner for read and write permission? No. Then are you in the group for read permission? No. So does anyone that doesn't match these other permissions have the right to do anything with the file? Yes, everyone is allowed to read it. Then it shows it to you.
Now, your file might have something like -rw-r----- and you don't own the file or are in the group to which the file belongs to. Then you are not allowed to change it (even if you are in the group you wouldn't get to change it scince you would still only have read permissions)

Now, this chmod business (related commands: chown, chgrp) are the same on all unix systems, and as Bob Loblaw you can allso use numbers to set permissions. So do a search on altavista or whatever for chmod and you will find explinations on how to do all of this.

After this throughout explination, I hope you have no more questions about chmod though

Oh, I almost forgot. To change to superuser you just use su. I assume it's the same as on OpenBSD in which case you would need to add yourself to the wheelgroup to do this. Just login as root and edit /etc/groups and add username to the wheelgroup. Then logout and use su instead of logging in as root in the future!
Type su and enter, it will ask for a password, give it your root pass and you are in as root. Now, when you are done just type exit to ascape to normal user.

An even better solution would be to use sudo. This let you give a command as root without logging in as root (as you do with su).
Don't know if this comes with FreeBSD, but if it don't it should be somewhere in the ports tree. Install it, read the manual, it has the instructions you need to know and you should be on your way.

/Fjodor

Last edited by Fjodor : January 13th, 2002 at 10:05 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Chmod


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway