Solved

linux error message when trying to run an automated move

Posted on 2011-03-16
7
438 Views
Last Modified: 2012-05-11
I'm trying to run a process that has been lying dormant on our system for a couple years. It involves the generation of a bunch of web pages that are written to a linux file then moved through a samba share to a windows server. At some point during all these transfers I'm getting the error message below for each .htm  file attempted. I don't know hardly anything about linux and the guy who set all this up is long gone. I know this was working at one time.


linux mv:preserving ownership for '/webpages/123.htm': operation not permitted
0
Comment
Question by:jrickercha
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 6

Accepted Solution

by:
de2Zotjes earned 334 total points
ID: 35150670
It's a warning, not an error. The mv program is telling you that it cannot preserve the original ownership for the file it is moving.
There is a good possibility that this is caused by the way you are mounting the the windows share on your linux box.

Anyway, check to see if the files actually do end up where you intend them to be. If not you could perhaps put up the script code and a list of mounts (simply type mount<enter>) so we get some more info on what is going on.
0
 

Author Comment

by:jrickercha
ID: 35151209
Thank you.
The files in question do not appear to be making the move.
The script that is executing the move is:
sudo mv /home/pick/webpages/partpageD* /webpages/$1
there are a bunch of these lines in the /usr/chabin/  directory in a file called mvwebpages
the "partpageD" portion changes depending upun the page being moved.

the mount command lists:
/dev/sda6 on / type ext2 (rw)
none on /proc type proc (rw)
/dev/sda1 on /boot type ext2 (rw)
/dev/sdd1 on /data type ext2 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
automount(pid683) on /misc type autofs (rw,fd=5,pgrp=683,minproto=2,maxproto=3)
//jabba/ARTransfers on /artransfers type smbfs (0)
//jabba/PickTransfers on /transfers type smbfs (0)
//jabba/ShippingRates on /shippingrates type smbfs (0)
//jabba/PowerSource on /pwrsrc type smbfs (0)
//jabba/TechSupp on /techsupp type smbfs (0)
//jabba/PartsWebPages on /webpages type smbfs (0)

The last entry is the target in question. We use one of the other shares (powersource) every day so I know at least that is working.

Thank you for your help!
John
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35186679
Hi!

Type (on the Linux server): cat /etc/passwd
Look for the username with PID 683. Then check that this username exist in your Windows environment and that the user account is enabled. Also check the Samba configuration ( in file samba.conf ) for how the shares are setup.

Regards, Tobias
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 34

Expert Comment

by:Duncan Roe
ID: 35187048
I don't like the look of the zeroes in e.g //jabba/PartsWebPages on /webpages type smbfs (0). That says to me they are mounted with no access, but I haven't really got into Samba yet so maybe they're OK. Any other expert know?
0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 166 total points
ID: 35187186
Have you compared the share permissions on the Windows server for //jabba/PartsWebPages and //jabba/PowerSource ? Can you set the same rights on PartsWebPages as on the PowerSource share?

Regards, Tobias
0
 
LVL 6

Assisted Solution

by:de2Zotjes
de2Zotjes earned 334 total points
ID: 35193637
I have rechecked and when there is no permission to write out the files to the target directory you will get a "permission denied" error. The "operation not permitted" is truly related to the ownership of file that was just written.

May I suggest that you try to locate the files you moved on other places in the filesystem hierarchy, possibly by using the find utility?
0
 

Author Comment

by:jrickercha
ID: 35194596
I will dig into the suggestions you have made and let you know what I find.
Thank you very much
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now