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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-06-2003, 08:01 PM
|
#1
|
Member
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50
Rep:
|
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.
|
|
|
11-06-2003, 08:19 PM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
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 ??
|
|
|
11-06-2003, 08:35 PM
|
#3
|
Member
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50
Original Poster
Rep:
|
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?
|
|
|
11-06-2003, 09:48 PM
|
#4
|
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:
|
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
|
|
|
11-06-2003, 09:52 PM
|
#5
|
LQ Newbie
Registered: Nov 2003
Location: Beijing, PRChina
Distribution: rh7/7.1/7.2/7.3/8/9/as3
Posts: 7
Rep:
|
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
|
|
|
11-07-2003, 10:45 AM
|
#6
|
Member
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50
Original Poster
Rep:
|
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.
|
|
|
11-07-2003, 11:05 AM
|
#7
|
Member
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50
Original Poster
Rep:
|
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?
|
|
|
11-09-2003, 07:35 PM
|
#8
|
LQ Newbie
Registered: Nov 2003
Location: Beijing, PRChina
Distribution: rh7/7.1/7.2/7.3/8/9/as3
Posts: 7
Rep:
|
I am very glad to share linux knowledge with your guys
lsattr
|
|
|
11-10-2003, 08:08 AM
|
#9
|
Member
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50
Original Poster
Rep:
|
The answer to my last question is obvious. chattr is used to list file attributes.
I know, I know: RTFM.
|
|
|
11-10-2003, 08:23 AM
|
#10
|
Member
Registered: Aug 2003
Location: Ottawa, Ontario, Canada
Distribution: Kubuntu
Posts: 50
Original Poster
Rep:
|
Actually the command is lsattr.
|
|
|
All times are GMT -5. The time now is 04:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|