Fedora Servers :: Crontab Backup Job Works / But Gives Chown / Chgrp Errors

Jul 3, 2010

As root, I use crontab to run mirrordir to backup directories. Everything gets copied over properly, but owner information isn't preserved and root is the owner of all the backed up files. I can deal with that, but crontab reports tons and tons of chown/chgrp errors for mirrordir every time I do back ups--which is every day--and the multiple emails to root of thousands of chown/chgrp errors is very annoying. The error is "Operation not permitted," but that doesn't make sense to me because the job runs as root (right?) and clearly the job is permitted to create the backup files, so why would it fail to chown and chgrp?

I've had the exact same setup on another server for years, and crontab has always run mirrordir without error. Any suggestions how to clear the errors on my new server?

View 14 Replies


ADVERTISEMENT

Fedora :: Umask, Chown, Chgrp And Other Commands?

Feb 7, 2010

ok so im working on homework and im not understanding what my teacher is wanting me to do and i dont have time to email him seeing as he might not read it until tomorrow. so ill copy and paste and if anyone can better explain it,

2) Use the umask command to change your file creation mask such that,by default for new files and directories you create, no permissions are taken away from the 'user' (owner), write permissions are taken away from the 'group' (group owner), and all permissions (read, write and execute) are taken away from 'other'. Take a screenshot of your terminal window showing the results of this step.

3) Use the touch command to create a new file called testfile. Use the ls command to display the contents of your current directory in long mode. Take a screenshot of your terminal window showing the results of this step. Ensure that the directory listing for testfile is completely visible in your screenshot.

4) Use the chown command to change the user associated with testfile (the owner) to cint201. Take a screenshot of your terminal window showing the results of this step.

5) Use the chgrp command to change the the group associated with testfile (the group owner) to users. Take a screenshot of your terminal window showing the results of this step.

6) Use the chmod command to change the permissions for testfile such that the 'user' (owner) permissions are set to read, write and execute, the 'group' (group owner) permission are set to read and execute, the 'other' permissions are set to grant neither read, write nor execute, and finally set the SUID bit for the file. Take a screenshot of your terminal window showing the results of this step.

7) Use the ls command to display the contents of your current directory in long mode. Take a screenshot of your terminal window showing the results of this step. Ensure that the directory listing for testfile is completely visible in your screenshot.

View 8 Replies View Related

Fedora :: Chgrp Chown Chmod Resetting After Boot

Aug 30, 2011

I'm trying to make a particular file accessible on my computer ( /dev/uinput ) without having to use sudo or su - I've set up a wiimote to act as a remote for my media player, and it requires access to that file. When I use chmod, chgrp or chown to change the file's settings, it enables access to the file - however, when I reboot my PC, the settings get reset, and I have to change the access rights when I first use it again. I've tried using the following commands to make the changes (substituting my username/groupname as user and group below), as root:

[Code]....

View 2 Replies View Related

General :: Why Are 'chown' And 'chgrp' Not Working

Feb 12, 2011

I've just installed Ubuntu 10.10 AMD-64 and mounted several partitions into /mnt/ directory. Now I want to be able to perform operations on those partitions without limitations. I'm trying to change the owner and group but it doesn't work. I'm typing sudo chown username filename to perform the operations.

View 1 Replies View Related

General :: Prevent Users From Executing Chown , Chgrp / Chmod?

Dec 8, 2010

In Linux, how do i prevent users from executing chown, chgrp or chmod?

View 2 Replies View Related

Software :: Scheduling Backup In Crontab When Put This File In Crontab To Schedule The Backup Program It Wont Run?

Apr 9, 2011

I have installed an application manager(monitoring application) on my linux server. Now, i need to have backup schedule for my application. The application itself has executive file to backup database.But when i put this file in my crontab to schedule the backup program it wont run!50 09 * * * root /opt/ME/AppManager9/bin/BackupMysqlDB.sh

View 1 Replies View Related

Ubuntu Servers :: CronTab Not Executing Script Works Fine Manually?

May 9, 2011

I have written a simple backup script, and added it to CronTab, but it doesnt execute at all. Here is my script: [URL]...And my CronTab entry: 0 */2 * * * root /home/server/Scripts/backup.sh

View 6 Replies View Related

Ubuntu :: Using /etc/crontab To Force Chown And Chmod In Specific Directory?

Feb 9, 2011

I need to actively make sure some files, in a specific directory, are chmod 750 and owned by transmission:media-daemons. Other users will save to this directory, with other permissions and UID/GID but I must make sureto reinforce this default.

So I have this on my /etc/crontab:

Code:

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

[Code]....

View 1 Replies View Related

Ubuntu Servers :: After Using Crontab With /etc/crontab / Giving Error "can't Find Command Root"?

Aug 26, 2010

I have a question about using crontab with /etc/crontab...

I had a cron job that I needed to run as root. At the time I thought that sticking it in /etc/crontab would be a good idea. However, I used the crontab command to edit /etc/crontab, which I guess is not standard procedure? Specifically, I configured /etc/crontab as my local user's crontab (i.e. sudo crontab /etc/crontab) then added my cron job as I would a local user crontab (i.e. sudo crontab -e).

Originally, my cron job looked like this:

30 * * * * root /my/batch/script &> /dev/null

After adding the new cron job I started seeing errors. Something to the effect of "can't find command root" or something similar. So I removed the 'root' user definition from the cron job and the job started running fine. However, because this is /etc/crontab, there are other system related cron jobs that have been defined to run under the root account (e.g. "17 * * * * root cd / && run-parts --report /etc/cron.hourly" runs as root, etc.). So these pre-existing system cron jobs, which up until now have been running smoothly, are now generating "can't find command root" errors. But I think that the system cron jobs _are_ successfully being run someplace because logrotate seems to be working.

So what I _think_ is happening is that /etc/crontab is being run twice: once as the system crontab, and once as my sudoed local user's crontab. When I run crontab -l I see nothing, but when I run sudo crontab -l I can see the contents of /etc/crontab. I am reluctant to delete my sudoed local user's crontab, because then in the process I would be deleting the system crontab, and I do not know how I should restore the system crontab's contents. (I am still not sure as to the most appropriate way to edit the system crontab).

How can I get out of this mess? I want /etc/crontab to go back to the way it was before--running _once_ as the system crontab. As for my new cron job, I'm willing to reconfigure it anywhere so long as I am still able to run it as root. Any ideas? (I am using Ubuntu 8.04 Server LTE)

View 2 Replies View Related

Programming :: Cmd Works In Bash, Not Crontab?

Jul 16, 2010

I want to write the date & time and a text string to a file from crontab.The following line works fine in the CL:echo $(/bin/date +"%F %T")" Some text" >> /home/me/foo.txtI installed in crontab and no text appears in the file that it is redirected to.The crontab entry looks like:* * * * * echo $(/bin/date +"%F %T")" Some text" >> /home/me/foo.txtTried a version to just write to stdout....* * * * * echo $(/bin/date +"%F %T")" Some text"No date, time or text appears at the command line

View 5 Replies View Related

Ubuntu :: Automated Backup - Crontab And Tar - Creates Archive-.tar Instead Of .tar

May 26, 2011

I have created an automated backup using the following:

[Code]...

When cron runs it creates a .tar like it is suppose to, but it creates archive-.tar. However, when I manually type in that command, I get archive-"whateverthedateis". Is there a step that I missed since the date keeps being omitted by this cronjob. I tried a another method

[Code]...

View 3 Replies View Related

General :: Script Don't Execute Itself Using Crontab Although It Works Manually?

May 26, 2010

One of my script don't execute itself using crontab although it works manually.

=> /var/log/cron
/var/log/cron show these 2 lignes at sheduled time
May 26 09:59:01 COMPUTER crond[26439]: (root) CMD (/usr/local/bin/script)

[code]....

View 6 Replies View Related

Server :: Crontab Fails But Command Line Works ?

Feb 19, 2011

Having an odd problem running a mysqldump via crontab. I have the script running on other servers and they work fine, so not sure how to actually troubleshoot, but the script looks like the following;

If I run it as a cronjob as root, it finishes in a second and a 20k file is there. If I run it from the command line as root it does the backup (takes a few minutes) but does complete the backup and can be unzipped and read successfully.

View 3 Replies View Related

General :: Using Shell Script Crontab Backup And Delete With Schedule?

Jun 20, 2011

I have a problem need help, I want to do a schedule with using shell script with crontab in linux SuSE SLES 10.

1. I have many server that want to do backup mysql all from that server everyday. I need advice for for write shell script to backup all mysql in different server to server backup everyday and create auto folder as date example 27102009, 28102009..........for a month will has 30 folder in server backup.

2. Also need to write shell script to delete all folder but keep only one week last example from 1 to 30 it will has 30 folder in sever backup but i want to keep only 7 folder last and want to set schedule delete it every saturday night.

3. used that shell script with crontab in linux.

View 3 Replies View Related

General :: Crontab - Backup Database Daily At Fixed Time

Jul 28, 2010

I'm trying to back up my database daily at 2:30am. is this the right format?
30 2 * * * mysqldump -u root -pPassword database > backup_$(date +%y%m%d).sql

View 8 Replies View Related

General :: Crontab Does Not Run All Lines Of A Script, But Manually It Works Perfect?

May 23, 2011

I use crontab to execute a bash script every minute and the output is redirected to a log file.In that bash script there is a screen command to start a screen session.When I execute the script manually it works perfect, but with crontab, the screen command is not executed, but the echo's are. Because they are written in the log file...Here's my script:Script removed for violation of LQ Ruleso the script runs perfect when I do it manually, but not with cron...Here's my crontab (sudo crontab -e)

# m h dom mon dow command
*/1 * * * * sudo /home/laurent/Games/Cod4/StartCod4.sh | egrep 'running|started' >> /home/laurent/Games/Cod4/Serverlog.log

View 7 Replies View Related

General :: Crontab Not Working \ Edited Crontab File Using Crontab -e?

Apr 27, 2010

I am using Linux 64 bit Redhat Linux. I am trying to setup simple crontab as follow...1. Edited crontab file using crontab -e2. Listed the file once to verify it using crontab -l. This will display as.. 18 5 * * 2-3 ksh $HOME/testScript.sh > $HOME/testscript.out3. Logged in a root and restarted cron deamon using "/etc/init.d/crond restart"As per my understanding now my testScript should start running at 5:18 am Thuesday

View 3 Replies View Related

General :: Crontab Mysqldump Error Mail / Reporting That Backup Is Not Working?

Jan 22, 2010

if I run mysqldump from crontab and error occurs, I would like to have email send to me (reporting that backup is not working).

View 2 Replies View Related

Ubuntu Servers :: Chown Recursion On Home Directories?

Apr 26, 2011

I have a perplexing problem that I was hoping some of you might help me solve. My servers run 10.10 and also serve as standalone LTSP hosts - none of this is terribly relevant I hope. Recently, a user complained of permission problems and so I ran a simple command:

Code:
chown -R username:username /home/username/*
and

[code]...

View 4 Replies View Related

Ubuntu Servers :: Mysql-admin Won't Schedule Backup But Will Manual Backup

Jan 19, 2010

I have a scheduled backup to run on our server at work and since the 7/12/09 it has be making 592k files instead of 10Mb files, In mysql-admin (the GUI tool) I have a stored connection for the user 'backup', the user has select and lock rights on the databases being backed up. I have a backup profile called 'backup_regular' and in the third tab along its scheduled to backup at 2 in the morning every week day. If I look at one of the small backup files generated I see the following:

Code:

-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version`

[code]....

It seems that MySQL can open and write to the file fine, it just can't dump

View 3 Replies View Related

Software :: Backup A Few Servers And A Bunch Of Desktops Onto One Backup Server?

May 10, 2010

Does anyone know of any decent enterprise level backup solutions for Linux? I need to backup a few servers and a bunch of desktops onto one backup server. Using rsync/tar.gz won't cut it. I need like bi-monthly full HDD backups, and things such as that, with a nice GUI interface to add/remove systems from the backup list. I need basically something similar to CommVault or Veritas. Veritas I've used before but it has its issues, such as leaving 30GB cache files. CommVault, I have no idea how much it is, and if it supports backing up to a hard drive rather than tape.

View 7 Replies View Related

Fedora Servers :: Backup Up My Files ?

Mar 21, 2009

I'm going to be launching my website soon, and I found a company to host it on one of their dedicated servers. I think I'm going to go with fedora as to OS, and well my problem is I'm having trouble finding a company to backup up my files, that both supports fedora and well is reasonably priced.

View 2 Replies View Related

Fedora Servers :: Network Backup To DVD-RW

Oct 7, 2010

I have several machines that I'd like to backup various folders through the linux box onto DVD-RW media.I want to keep log files of what was written and when to dvd on one machine and have it automagically assign a unique serial number that I can print on the dvd in case I need to recover.I'd like a user friendly UI that I can point and click to schedule the backup and it's type.Is there a good Fedora backup application (read easy to use/understand and configure) I can use to backup machines across a network and across multiple dvd's (if needed)? The host machine is a F11 box.These are a mix of Win server 2008, win 7, win XP and several Fedora boxes.Speaking of dvd media is this a good idea and how many erase/write cycles are they good for?

View 2 Replies View Related

Fedora Servers :: Looking For Backup Solution

Aug 8, 2011

I need to install a backup server in my work environment.We have a Windows 2008 server and an old DELL PowerEdge 1750 server that has no OS on it yet.I would like to install Fedora on it and then backup the Windows Server data on the Fedora server using rsync or something else to do the backups.Do you think it's a good idea ? If not what would you use to backup the Windows server data, preferably on a linux system.

View 12 Replies View Related

Fedora Servers :: Site Works On F9 But Not F12?

May 3, 2010

I am running a website using a Fedora 9/ Apache 2 platform. I have added two new disks to the same server and installed Fedora 12 (I don't have both sets of disks in at the same time either the old ones with F9 or the new ones with F12). Having copied 'all' of the settings over to the new F12 installation it only serves pages on localhost not on the external IP as the F9 version does.

I have now installed F9 (got rid of F12) onto the new disks and copied the settings from the old installation onto the new disks and the server once again serves up pages. The only hardware changes are the disks being popped in and out between restarts as I swap between the old and new installations.

Hopefully there is some obvious (to someone) difference between F12 and F9 that would account for this.I have messed with settings for a while now and am almost at the point of paying for RHEL to see if that does the job.

View 4 Replies View Related

Fedora Servers :: Mount Errors From Fstab - Used To Work?

Aug 19, 2011

I have two mount points that used to work. I have them defined as cifs shares in fstab, and they map to a Windows machine, which I am able to ping from my Fedora machine, but for some reason I get a mount error 2, and the destination is not accessible. The man page doesn't really give any troubleshooting steps. Since I am mounting by IP address (which as I said has worked before), nothing has changed, although the IP address did change, which I updated in the fstab file to the new IP address (and since I have reserved this new IP address so it can't change again!)

I ran a test and shared a folder from another one of my computers, and added a line in fstab to auto-mount that, and I get a "permission denied" error 13, which is different than the error 2 I get on the other 2 shares. What should I be looking for as far as actual connectivity between the machines? I have verified that the windows machine is on and I can access the same shares from another computer.

Update: Added the host and IP address to my hosts file, and replaced the IP address with the name, and still get the same error. Also, the share name has a space in it, so I replace that with a "�40" space character (which worked in the past). I tried replacing that with an actual space, and putting quotes around the URL, but then I get a "bad URL" error.

[Code]..

View 5 Replies View Related

Fedora Servers :: Tar Backup Of Webserver On FC10?

Jan 27, 2009

I want to backup my apache website using tar. I want to make sure all the permissions and such stay the same so that if I restore a website, it's ready to go exactly as it had been.I am using the following command and would like to know if there is anything else I should neeed to do?

tar --xattrs cvzf backup.tgz /path-to-webserver-files

Now my other question is since tar doesn't store absolute paths, when I run the restore I have to be in the root directory? In another words if I run the command in a user directory will tar do something retarded like encode the paths as ../path-to-webserver or will it just be path-to-webserver so that when I run the restore from the / folder it will automatically go into the right place?

View 4 Replies View Related

Ubuntu :: Backup A Partition With Errors Using Dd?

Nov 7, 2010

i use the dd command to regularly backup my windows partition. basically i do:

PHP Code:
sudo dd if=/dev/sda1 of=./Backupfile.bin bs=100MB 
form a USB HDD..

this works charms for backup and restore even over a remote shell.. i have even been able to remotely repair my system from vacation. now comes the problem: the partition has developed some I/O errors. Windows has notices and just marked some sectors as being broken/bad. But dd being Filesystem independent doesnt know and aborts when trying to read and getting an HArdware IO error.

my question: how can i fix this so i can still backup AND restore the partition? i cant afford a new HD at the time.

View 1 Replies View Related

Slackware :: Filesystem Errors After Backup With Dd?

Jun 11, 2010

in preparation for the update to Slackware64 13.1 I did a complete backup of my system with dd.

I used the Slackware 13.0 (not 64 bit) DVD to boot and executed the command:
# dd if=/dev/sda of=/dev/sdb

The command finished without any errors as expected. First I tried to boot the destination hard disk to check if the backup was successful and I can start with updating the source disk to 13.1. But at boot time I got the message that the last file system check is 197 day ago, the file system check started automatically and found errors which it could not correct. At this point I thought it was maybe a copy or a hard disk error and tried to boot the source disk. But the behaviour was exactly the same on the source disk. With the source disk I followed then the recommendation, logged in with root password and executed the recommended command which was something like e2fsck -v -h /dev/sda1. Then the system did a file system check and scrolled a lot of numbers over the screen. After a while it reported that it's ready and the system needs a restart.
I switched off and on again. Then the system bootet as usual, and seems to run okay at the moment. But now I'm unsure if really everything is okay.

What I'm confused of is, why the system reported that the last file system check was 197 days ago and why this was just after the dd backup. Shouldn't the automatic file system check at boot time run more often as every 197 days or mounts? I didn't change any default settings (as far as I know). The file system of the root partition is ext4 and my computer normally is switched on and off once every day.

My question now is, if this behaviour can have something to do with the dd backup.
Is my system after the file system check okay again, or should I expect further problems?

View 12 Replies View Related

Fedora Servers :: User Directory Apache Results In 403 Errors?

Mar 14, 2009

I want to enable User Directories in Apache. So in httpd.conf I set:

Code:
<IfModule mod_userdir.c>
#UserDir enabled // commented out
UserDir public_html
</IfModule>
Directory /home/kees is listed has the following file permissions: drwx--x--x 32 kees kees
Directory /home/kees/public_html has the following file permissions: drwxr-xr-x 2 root root

Directory public_html has two files: index.html and index.php, both with file permissions: -rwxr-xr-x 1 root root If I now try to open http://myhost/~kees/index.html (or index.php) in my browser I get a 403 Forbidden error. If I look in my error log I see the following messages if I first try to open the index.html and then the index.php file:

[Code]...

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved