LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-28-2004, 06:19 PM   #1
phiqtion
LQ Newbie
 
Registered: Aug 2003
Location: None Of Your Business..
Distribution: None!
Posts: 24

Rep: Reputation: 15
how do i set write access to a folder?


i just need the command. im currently installing xine, and i need to edit aome file,. but it says i dont have write access.

thanks
 
Old 05-28-2004, 06:31 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You probably don't want to change the permissions,
but rather become root to do the editing.

su - root

Cheers,
Tink
 
Old 05-28-2004, 06:34 PM   #3
phiqtion
LQ Newbie
 
Registered: Aug 2003
Location: None Of Your Business..
Distribution: None!
Posts: 24

Original Poster
Rep: Reputation: 15
no, that's the the terminal. i need the command to set the permission in the folder, so the next time i open that file. i can edit it freely.
 
Old 05-28-2004, 06:41 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Other way round:

If the file doesn't live under your /home/<username>
root should be the only one with write access to it.

If it 's one of your personal configuration files (under
/home/<username>, and you can't write to it, check
who's the owner. If it's you, change the permissions
using chmod u+w <file>. If you're not the owner,
become root, and then chown <username>:users <file>.

However, I can't emphasisze enough that if it's a system
wide file, you should become root to edit it!!!



Cheers,
Tink
 
Old 05-28-2004, 06:48 PM   #5
phiqtion
LQ Newbie
 
Registered: Aug 2003
Location: None Of Your Business..
Distribution: None!
Posts: 24

Original Poster
Rep: Reputation: 15
it's located in the /etc/ folder. the path is /etc/ld.so.conf

xine tells me this.

Make sure your /etc/ld.so.conf contains /usr/local/lib
 
Old 05-28-2004, 07:07 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
OK, you DEFINITELY don't want that one to be
writable by anyone else than root.

[edit]
If you don't want to log-out, log back in as root
so you can use a graphical editor, learn to use one
of the abundantly available command-line ones
so you can do system administration tasks from
a console using su -
E.g. vi, emacs, pico, mc, joe, ....
[/edit]


Cheers,
Tink

Last edited by Tinkster; 05-28-2004 at 07:11 PM.
 
Old 05-28-2004, 07:13 PM   #7
phlogistonjohn
LQ Newbie
 
Registered: Jul 2003
Location: MA, USA
Distribution: Mandrake,Debian,Zaurus
Posts: 17

Rep: Reputation: 0
The previous posters are correct, you don't want to change the permissions on that file. That would weaken the overall integrity and security of the system. Instead, try editing the file by using su like the previous poster said. It will temporarily "change" you into root, who can edit any file on the system.

For added peace of mind you can execute exactly one command as root using su by typing:
su -c "<command"

This'll run just that command so you might type 'su -c "vi /etc/ld.so.conf"' or 'su -c "pico /etc/ld.so.conf"'

You can even use a GUI editor in place of vi or pico above the editor will simply be run as a different user than the rest of your desktop.

sudo's even better, but takes a little setting up.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grip : no write access to write encoded file bidouilleur Linux - Software 5 10-09-2010 10:23 PM
Folder Max Size and Limiting SSH access to home folder. Mefistofeles Linux - General 4 11-26-2005 03:09 PM
where a service should place a folder so every user can have read/write access. shahidawan Linux - Security 3 05-07-2005 02:25 PM
Permission to write to folder Garoth Linux - Software 1 10-10-2004 12:41 AM
Write permissions to a hole folder Mega Man X Linux - General 3 07-12-2003 06:32 AM


All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration