Page 1 of 1
why won't chmod work?
Posted: Sun Aug 29, 2004 10:41 pm
by Red Squirrel
Randomly, this happends when I want to chmod stuff. Why?!
[root@mailserver scripts]# chmod -r 555 /data/samba/backup/server/intranet/*
chmod: failed to get attributes of `555': No such file or directory
[root@mailserver scripts]#
sometimes it works, sometimes it does not. And yes it's 555 that I want. I want to be able to read, but not write. By default when you cp stuff it puts it 777 but in this particular case I need it 555, so after the backup I just chmod it to 555.
Archived topic from Anythingforums, old topic ID:913, old post ID:10041
why won't chmod work?
Posted: Sun Aug 29, 2004 10:49 pm
by Red Squirrel
Oh and this is sort of an emergency since as long as this is caput, my cron jobs will screw up and probably cause more problems.
Not to mention backups won't get done.
Archived topic from Anythingforums, old topic ID:913, old post ID:10050
why won't chmod work?
Posted: Mon Aug 30, 2004 12:08 am
by megaspaz
it looks like the directory it's looking to chmod the contents of doesn't exist. it could be how your scripts work, if you have them delete the parent directory or whatnot. i don't know as i'm not on your system. i will say this though, if cp is changing every copied file/directory to 777 then you have something very wrong going on. cp is not supposed to change the permissions at all, only the owner and group depending on where you copy the file to. have you run chkrootkit?
Archived topic from Anythingforums, old topic ID:913, old post ID:10099
why won't chmod work?
Posted: Mon Aug 30, 2004 8:37 pm
by Red Squirrel
Well the directory DOES exists as I tried to do cd /data/samba/backup/server/intranet/. Even chmod without the * does the same so it has nothing to do with that. The reason I put that is because I don't want it to change the folder, just the files. (for some reason it screws up when it changes the folder... that's when it decides to work of course) And cp just keeps the existing permissions right? Since if yes, the existing permissions are most likely 777 for that folder since that's the way I have it setup.
I still did not get around to running chkrootkit, I'll try it sometimes tonight since I'm off tomorow anyway. In case I screw up something trying to install it I need time to fix it.
Archived topic from Anythingforums, old topic ID:913, old post ID:10256
why won't chmod work?
Posted: Mon Aug 30, 2004 9:11 pm
by Red Squirrel
my bad, it actually chmods it as 755 when I do a cp. So for that folder it does not let me delete files (which is what I want - in case of virus or what not) but there's still an owner write access and I would rather still have it 555, since a well written virus can just present itself as the owner.
I know this is paranoid security, but it's because I fix allot of virus infected computers so I want to be able to not worry about hooking them up to the network. So if the virus does end up deleting all the files in the shares, at least the backups will be safe, and they are put on a share since I often refer to them if I mess something up on my site or something.
Archived topic from Anythingforums, old topic ID:913, old post ID:10262
why won't chmod work?
Posted: Mon Sep 06, 2004 4:00 pm
by Red Squirrel
It's still doing it, anyone have a solution?
I sort of changed the plans, I forgot that because I have an automated backup that needs to overrite files to update, I can't set it to a no-write permission. so I just want to chmod the entire thing back to 777 how it should be so that files can be written to, but it still won't let me.
[root@mailserver root]# chmod 777 -r /data/samba/backup/
chmod: failed to get attributes of `777': No such file or directory
[root@mailserver root]#
That exact command used to work before.
Archived topic from Anythingforums, old topic ID:913, old post ID:11435
why won't chmod work?
Posted: Mon Sep 06, 2004 4:50 pm
by Red Squirrel
Now cp won't work.
[root@mailserver scripts]# cp -rvu /data/samba/backup/* /data/samba/backup_rom/monthly
cp: ]copying multiple files, but last argument `/data/samba/backup_rom/monthly' is not a directory
Try `cp --help' for more information.
[root@mailserver scripts]#
What the hell is going on?
Archived topic from Anythingforums, old topic ID:913, old post ID:11442