Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
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.
|
|
|
10-01-2002, 12:24 PM
|
#1
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Rep:
|
cannot unlink cannot remove
I am having a problem when I try to rename or delete files. Most of our access to the server is through Samba. However, I tried rm and mv in linux and the problem is still there.
All our users are in the group associated with these files.
Permission for the files is 777.
lsattr shows no attributes.
The owner of the file and root can mv and rm.
Any other users cannot even though they they are in the same group.
The mv command results in the following messages.
mv: cannot unlink `ACH99': Operation not permitted
mv: cannot remove `ACH99': Operation not permitted
We have been running on linux/samba for over a month. I think we this problem just started in the last day or two. I am sure we would have noticed it earlier if it had been happening the whole time. I think I have only touched the smb.conf recently. None of this makes sense to me.
Help!
|
|
|
10-01-2002, 12:29 PM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Is it only that one file that you cannot use the mv command ? Do you get the same error when logged in as root and trying to move ?
|
|
|
10-01-2002, 12:46 PM
|
#3
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Original Poster
Rep:
|
The same file for any file. Only the owner can rm or mv.
|
|
|
10-01-2002, 01:09 PM
|
#4
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Original Poster
Rep:
|
Root can still mv and rm.
I have users running batch files that rename and delete all the time. If I don't resolve this, they don't work correctly.
|
|
|
10-01-2002, 01:39 PM
|
#5
|
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
|
Does this occur anywhere on the filesystem? (try it on a file in /tmp, for
example)
Can you post the results from following:
ls -la /
ls -la /home
(you can remove the actual user directories from the output, the only
important thing is the permissions field)
Cheers,
Moses
|
|
|
10-01-2002, 02:34 PM
|
#6
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Original Poster
Rep:
|
I have a subdirectory of home called main and a share setup for Samba that points to it. I can mv in main. The problem occurs in the subdirectory OPERATE. Here is the results of ls -l.
drwsrwsrwt 4 useridx Groupz 20480 Oct 1 14:21 OPERATE
Here is what a file and an attempt to move looks like.
-rwsrwsrwt 1 useridx Groupz 590 May 31 1995 LC5.OLD
[useridy@servername OPERATE]$ mv LC5.OLD LC5.BAK
mv: cannot unlink `LC5.OLD': Operation not permitted
mv: cannot remove `LC5.OLD': Operation not permitted
|
|
|
10-01-2002, 02:42 PM
|
#7
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Original Poster
Rep:
|
Here is the rest of the information you asked for Moses.
[usery@servername /]$ ls -la /
total 188
drwxr-xr-x 19 root root 1024 Aug 6 08:47 .
drwxr-xr-x 19 root root 1024 Aug 6 08:47 ..
-rw-r--r-- 1 root root 0 Aug 6 08:47 .autofsck
drwxr-xr-x 2 root root 2048 Apr 5 12:08 bin
drwxr-xr-x 4 root root 1024 Mar 26 2002 boot
drwxr-xr-x 17 root root 77824 Aug 6 08:47 dev
drwxr-xr-x 48 root root 4096 Oct 1 13:25 etc
drwxr-xr-x 30 root root 4096 Aug 26 11:18 home
drwxr-xr-x 2 root root 1024 Jun 21 2001 initrd
drwxr-xr-x 7 root root 3072 Mar 2 2002 lib
drwxr-xr-x 2 root root 12288 Mar 2 2002 lost+found
drwxr-xr-x 2 root root 1024 Aug 29 2001 misc
drwxr-xr-x 4 root root 1024 Mar 2 2002 mnt
drwxr-xr-x 3 root root 1024 May 31 02:22 opt
dr-xr-xr-x 134 root root 0 Aug 6 08:46 proc
drwxr-x--- 17 root root 2048 Sep 20 09:48 root
drwxr-xr-x 2 root root 4096 Apr 5 12:08 sbin
drwxrwxrwt 7 root root 68608 Oct 1 13:17 tmp
drwxr-xr-x 16 root root 4096 Jul 9 15:34 usr
drwxr-xr-x 20 root root 1024 Jun 27 15:15 var
[usery@servername /]$ ls -la /home
total 129
drwxr-xr-x 30 root root 4096 Aug 26 11:18 .
drwxr-xr-x 19 root root 1024 Aug 6 08:47 ..
drwx------ 3
drwx------ 3
drwx------ 3
drwx------ 2
drwx------ 3
drwx------ 3
drwx------ 2
drwx------ 2
drwx------ 3
drwx------ 3
drwx------ 2
drwxr-xr-x 2 root root 16384 Mar 2 2002 lost+found
drwxrwxrwx 62 root Admin 4096 Oct 1 14:20 main
drwx------ 3
drwx------ 2
drwx------ 16
drwx------ 3
drwx------ 2
drwx------ 2
drwx------ 3
drwx------ 3
drwx------ 3
drwxr-xr-x 3
drwx------ 3
drwxrwxrwx 2
drwx------ 3
drwx------ 2
drwx------ 2
|
|
|
10-01-2002, 02:46 PM
|
#8
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Original Poster
Rep:
|
After additional testing it appears to be any subdirectory of main that has the problem.
|
|
|
10-01-2002, 02:47 PM
|
#9
|
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
|
Ok, try this:
in the directory above OPERATE (main?),
chmod ug-s OPERATE
chmod ug+x OPERATE
chmod ug-s LC5.OLD
mv LC5.OLD LC5.BAK
|
|
|
10-01-2002, 02:50 PM
|
#10
|
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
|
Ooops,
I didn't wait long enough to reply, but I guess doing the above would still
be informative. Of course, I forgot to mention that you should do the
chmod as root and the mv as a user who's been having problems with mv.
|
|
|
10-01-2002, 02:55 PM
|
#11
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Original Poster
Rep:
|
Moses,
The first two lines appear to have worked.
I will have to read the documentation to understand what I did and apply it to the rest of main.
Thank You Very Much
|
|
|
10-01-2002, 03:05 PM
|
#12
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Original Poster
Rep:
|
Ooops! Spoke too soon.
Thanks for reminding me to test from a user other than root. I should have known better. It still is not working.
|
|
|
10-01-2002, 03:12 PM
|
#13
|
LQ Newbie
Registered: Aug 2002
Posts: 18
Original Poster
Rep:
|
Here is what it looked like. (The test file is now LC5.BAK because the move worked for root.)
[root@servername main]# chmod ug-s OPERATE
[root@servername main]# chmod ug+x OPERATE
[root@servername main]# cd OPERATE
[root@servername OPERATE]# chmod ug-s LC5.BAK
[usery@servername OPERATE]$ ls -l LC5.BAK
-rwxrwxrwt 1 userx Groupz 590 May 31 1995 LC5.BAK
[usery@servername OPERATE]$ mv LC5.BAK LC5.OLD
mv: cannot unlink `LC5.BAK': Operation not permitted
mv: cannot remove `LC5.BAK': Operation not permitted
|
|
|
10-01-2002, 03:48 PM
|
#14
|
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
|
Ok,
try changing the sticky bit in OPERATE
chmod -t OPERATE
chmod -t LC5.BAK
become a different user
mv LC5.BAK LC5.OLD
|
|
|
10-01-2002, 03:54 PM
|
#15
|
LQ Addict
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704
Rep:
|
That what I was going to suggest, remove the sticky bit - the purpose of sticky bit is to emphasize the ownership of the files on a filesystem, so with it in place only root or the owner of the file has perms to do whatever they should do, even having -rwxrwxrwt won't let others to write to the file.
|
|
|
All times are GMT -5. The time now is 02:06 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
|
|