Samba when I delete the original file sometimes deletes backup
Linux - NewbieThis 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
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.
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.
Samba when I delete the original file sometimes deletes backup
I am running rh9 and samba sometimes when I transfer a folder from w2k. It shows up fine. I verify size and the files stored inside, everything looks identical. Then I delete the original file off of w2k. When I go back to linux some of the files are now missing and some files are still there. This is happening quite often. It sounds like the files arent really being moved to the linux box and maybe a shortcut is being created. But I dont know how to tell the difference. Is it possible to insure that the files are actually transfered. I am loosing important data. Why would only random files disapear and not all or none. Makes no sense to me. Is there anyone that knows why this would be happening.
Your description is too open-ended, there could be tons of possibilities, a few of which I'll put here:
1) You just dragged the files over using right-click, so it just creates shortcuts. (unlikely).
2) You dragged over shortcuts instead of files. (could be, if you have twitchy fingers you could have accidentally dropped the files on your Windows folder [thus creating shortcuts, and selecting them automatically], and dragged the shortcuts over instead).
3) You did copy the files properly, but due to insecure permissions the files are deletable by someone else.
4) Expansion to (3) above, it could be a virus.
See if you can replicate the problem with dummy files.
Well I know that the original files were selected when they were moved. I dont really think that shortcuts were created instead of transfer because some of the files are still there and I did verify the size of the folder before deleting origianal copies on w2k. No one else could have deleted the files. As far as a virus goes that is a possibility I suppose. Do you know of any linux viruses that delete files in this fation. None of my other files are missing. Just the ones I moved from the remote w2k sys. Does redhat 9 come with virus protection or can I get a virus scanner for linux. That is something I will look into. I shouldn't have a virus on the w2k box. At least norton doesn't think so as of Sunday night. I was looking into samba documentation and it states something about a "mangled names = yes" statement in the smb.conf that allows linux to see non dos names. Which is another possiblity I am about to attempt. But the odd thing is. I could see them before. Why would they be unviewable all of a sudden. Strange!
Any more ideas?
Actually, Linux doesn't need a virus scanner unless it's being used as a Samba server, which means, it can "store" viruses although it won't do anything harmful to the Linux box. A better way is to tighten your write permissions.
Mangled names have nothing to do with your problem... It just emulates DOS behaviour...
ie. Rename long files to their eight character equavalent:
eg. SOME LONG FILE.EXE to SOMELO~1.EXE
Hello I didn't think that linux was vulnerable to viruses in the same way windows is. I read something else at work (bare with me I got pretty busy just after reading and didn't have a chance to look through it all carefully) about not creating the file or viewing the file? as a user with admin rights. It mentioned that samba performs a test to see if it can write to the file so its better to create the folder as some one who cant administer the file and then change the permissions after. Sounds weird. Oh, it was somethng to do with setting up a remote installation share for a win installation. Could that cause a similar problem like this? Writing a folder as adm? I guess I should test another userid. What do you think?
I suggest you take a look at your permissions for the problematic share. Maybe even post your smb.conf file here... there's a lot of samba gurus around, maybe they can give some useful feedback.
I think the problem happened when I mv the directory. It just happened again with mysql I did mv mysql.x.x.x mysql to shorten the directory name because it was huge, and now it doesn't work and I cant cd to the directory. Oddly enough because I remember the name of the directory I ran a search for it and it shows up when using locate. But I still cant access the directory or execute the files which show to still be in the directory unfortunatly I don't remember the names of the other directories. Not that it would help I dont know how to get the mysql files to sho up again. Any ideas?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.