LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-06-2003, 08:01 PM   #1
tmoorman
Member
 
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50

Rep: Reputation: 15
Question samba conf file is read-only to root


I am not sure if this is the correct forum but here goes...

When I edit /etc/samba/smb.conf I cannot save it (as root). The file has been made read-only.
When I try to change permissions (again, as root) I get this error:

[root@penguin samba]# chmod 744 smb.conf
chmod: changing permissions of `smb.conf': Operation not permitted

This is what 'ls -l' gives me:
-rwxr--r-- 1 root root 1398 Sep 18 11:50 smb.conf*

Why can't I edit this file as root? I edited it in the past. I even tried it with Knoppix with the same result.
I am able to create and edit other files in this directory but not this one file. Does anyone know what is going on?
I am running Mandrake 9.1

Thanks.
 
Old 11-06-2003, 08:19 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Not sure why it won't allow you to edit, what editor are you using? Have you tried renaming it and maybe copying the contents in it to a new file and name it smb.conf ??
 
Old 11-06-2003, 08:35 PM   #3
tmoorman
Member
 
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50

Original Poster
Rep: Reputation: 15
I can't rename (mv). Also, lmhosts has the same problem. I am using gedit and have used kedit. (The window manager is KDE 3.1.) I have tried turning off the smb service with no effect. The funny thing is that samba in all other respects is working fine: files to/from Linux and WinXP. I would just like to be able to change the Linux shares.
Is there a way to see what is doing this?
 
Old 11-06-2003, 09:48 PM   #4
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Are you absolutely sure that you are root when changing the permissions?

To make sure, issue the command:
whoami

To become root, issue the command:
su -l
 
Old 11-06-2003, 09:52 PM   #5
intolinux
LQ Newbie
 
Registered: Nov 2003
Location: Beijing, PRChina
Distribution: rh7/7.1/7.2/7.3/8/9/as3
Posts: 7

Rep: Reputation: 0
All your guesses are wrong, I am afraid.

just use this command to make /etc/samba/smb.conf usable for root
chattr -i /etc/samba/smb.conf
 
Old 11-07-2003, 10:45 AM   #6
tmoorman
Member
 
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50

Original Poster
Rep: Reputation: 15
Thank you, Thank you, Thank you! It worked!
I knew it must be something simple.
I was on the verge of doing something drastic (like re-install samba).
Your help is much appreciated.
 
Old 11-07-2003, 11:05 AM   #7
tmoorman
Member
 
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50

Original Poster
Rep: Reputation: 15
intolinux,

One question about chattr:
How do you know which files have this attribute set? 'ls' doesn't seem to do it. Do you know which command does?
 
Old 11-09-2003, 07:35 PM   #8
intolinux
LQ Newbie
 
Registered: Nov 2003
Location: Beijing, PRChina
Distribution: rh7/7.1/7.2/7.3/8/9/as3
Posts: 7

Rep: Reputation: 0
I am very glad to share linux knowledge with your guys

lsattr
 
Old 11-10-2003, 08:08 AM   #9
tmoorman
Member
 
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50

Original Poster
Rep: Reputation: 15
The answer to my last question is obvious. chattr is used to list file attributes.

I know, I know: RTFM.
 
Old 11-10-2003, 08:23 AM   #10
tmoorman
Member
 
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50

Original Poster
Rep: Reputation: 15
Actually the command is lsattr.
 
  


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
can't start x, xorg.conf read only, no root access doublez Linux - General 2 11-16-2005 02:49 PM
root unable to read ocr-file veggur Linux - Software 5 05-02-2005 09:56 AM
could someone post their working samba.conf file? TheOneAndOnlySM Linux - Networking 8 05-01-2004 11:34 PM
Perl Program That Read From .conf File Crashed_Again Programming 2 12-07-2003 06:49 AM
Can you guys check my Samba conf file? gsmonk Linux - Networking 1 09-19-2003 07:40 PM


All times are GMT -5. The time now is 02:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration