Ubuntu :: Rsync Creating Wrong Permissions For Directories?

May 1, 2010

I try to use rsync for backing up some directories and I have to following problem: some files have permissions that prevent me from running rsync under my own user id. So I run it under root using the option "-a" which according to the man page should preserve the permissions, owner and group information:

However, when I run this under root, the directories created in the backup location get user root and group root while ordinary files keep the original user and group. What am I missing here? How can I get rsync to preserve the user and groups for all files, including directories?

Here is a command to illustrate my problem
Code:
sudo rsync -a /home/youruser /tmp

If you try that and terminate with Ctrl-C after a few seconds, there will be a directory /tmp/youruser where the directories contained within are owned by root group root.

View 2 Replies


ADVERTISEMENT

General :: Multiple Users To Create Directories Over SFTP So The New Directories Keep The Same Permissions?

May 15, 2011

I want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.

I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.

I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?

View 2 Replies View Related

Ubuntu :: Permissions For Rsync And BackinTime - Setup 2nd HD With Correct Permissions?

May 31, 2011

Problem: permissions for rsync and BackinTime. Setup: Ubuntu 11.04, Two internal HD, #1=main, single boot, #2=backup drive. Question: How do I set up my 2nd HD with correct permissions? Background: I had previously a dual boot XP+10.04 with a 2nd HD formatted as NTFS. With this I was able to use my rsync and backintime to my 2nd HD with no issue. My new set up is EXT4 on both HD.

(I even tried to reformat my 2nd HD as NTFS, but that didnt fix the issue) I followed [URL] to mount the 2nd HD and get permissions. But now when I run backintime i get this error: [E] Error: rsync: opendir "/home/myhome/.ssh" failed: Permission denied (13) I did my requisite reading for a newbie, and am stuck. I ran backintime as root, and it backed up ok. How do I run my user version of backintime? (i.e. How do I fix the permission issue?)

View 9 Replies View Related

Ubuntu :: Use Rsync To Backup Home Directories To A Nas?

Apr 14, 2010

I'm hoping somebody can find something here that I haven't. I'm trying to use rsync to backup home directories to a nas. First, I NFS mounted the nas and ran an rsync and everything worked out fine. the transfer completed after a few hours and everyting was transferred (lots of stuff!). I then decided that I don't want to leave the nas mounted all the time and I didn't want to automate mounting and unmounting of the nas as I didn't think I could produce a script that would work reliably enough. So I decided to start an rsync daemon on the nas and upgrade via that. I run the following command (results are included. the ^C is me killing it after it hangs).


Code:
ryan@server:/etc/backup$ sudo rsync -ax --stats --progress --delete /data root@192.168.0.98:backups1
root@192.168.0.98's password:
sending incremental file list
data/home/user/Documents/
data/home/user/Documents/The File.wmv

[Code]...

View 3 Replies View Related

General :: Sync Two Directories Using Rsync?

Dec 24, 2010

I try to sync two directories using rsync.

the source is on Linux, and the other is on windows.

So, I mount the directory on windows using the command mount -t cifs . in Linux system.

Then I execute rsync ....

Everything is OK, but rsync prints out

rsync: chown "/mnt/windows/A/." failed: Permission denied (13)
rsync: chown "/mnt/windows/A/readme.txt" failed: Permission denied (13)

I want to sync the directories without changing ownership.

View 2 Replies View Related

Software :: Rsync To Check Two Directories?

Jan 23, 2011

I just burnt a large no. of things to a DVD, and Brasero complained of errors. How do I check whether all the files on the disc are the same as the ones on my HD

View 3 Replies View Related

General :: Rsync Directories By Path / Filename Only?

Aug 22, 2010

Is there a way for me to rsync two directories comparing only filenames (and not file size, date modified, or any other criteria)?

View 2 Replies View Related

Server :: Rsync Showing Wrong Output?

Feb 16, 2011

Iam comparing 2 filesystem using the below command.rsync -navrz --exclude=logs/* /opt/otm/ glrrd@105.78.7.100:/opt/otm/The output showing the files which are same in size and timestamp that are to be sync.Iam using rsync 2.6.3 version so i dont have itemize changes option to debug the problem.Is there anyway i can find the how rsync is finding the difference between the 2 filesytemEx: filesystem1

-rw-rw-r-- 1 glog glog 39132 Nov 26 2009 FinJ-code_2003-10-22_12h17_CEST+0200.jar
-rw-rw-r-- 1 glog glog 39132 Nov 26 2009 finj.jar
-rw-rw-r-- 1 glog glog 954987 Nov 26 2009 jakarta-taglibs-standard-1.1.2.zip

[code]....

View 3 Replies View Related

OpenSUSE :: Rsync Backup *cache* Directories And Files?

Mar 4, 2010

I'm creating a backup scheme with rsync.

It is pretty clear not to include these:
/var/lib/named/proc
/var/lib/ntp/proc

[code]...

View 3 Replies View Related

General :: Sync Local And Remote Directories Using Rsync?

Jul 14, 2010

I have two linux box that i would like to keep in sync. I see option -avz syncs the remote with local but new local files are not pushed.

View 2 Replies View Related

Ubuntu :: Permissions With Rsync On Backup

Jun 18, 2010

I'm trying to learn how rsync works to backup my system. I tried:
Code:
rsync -azvv /home /media/Elements
I get a folder called home on my external hard drive but when I use ls -l to see the permissions they are all wrong.
On my /home folder the permissions for /nathan are
drwxr-xr-x 48 nathan nathan
The permissions on the backup /nathan folder are
drwx------ 1 nathan nathan

I also tried using the long version of -a which is -rlptgoD and that didn't work either. What do the 48 and 1 mean when I used ls -l? When I look in the /nathan folder the permissions are all screwed up too. A lot of the files are backed up as executable and the permissions are all screwed up. I also ran it with sudo, and that didn't work either. The permissions were still screwed up and ownership is messed up too.

View 3 Replies View Related

Ubuntu :: Creating Directories Owned By Specified User

Jul 15, 2010

I have just installed an SSD as a secondary hard drive and formatted as ext4. (the Ubuntu installation is on a different drive)how I would go about creating a directory on the SSD that is owned by the user 'Test user'.

View 8 Replies View Related

General :: Creating Multiple Directories?

Mar 28, 2010

I need to create subdirectories in about 300 existing directories - the subdirectory will have the same name in all 300 existing directories. How do I do this using the mkdir command using a regular expression or globbing?

View 3 Replies View Related

Ubuntu Installation :: Creating Directories Owned By A Specified User On SSD?

Jul 15, 2010

I have just installed an SSD as a secondary hard drive and formatted as ext4. (the Ubuntu installation is on a different drive) Im very new to linux, Could someone inform me how I would go about creating a directory on the SSD that is owned by the user 'Test user'

Im sorry if this is a daft question, im just moving from windows to linux and struggling a lot.

View 3 Replies View Related

Software :: Rsync -a Does Not Seem To Preserve Permissions

Jun 12, 2011

I know rsync generates a lot of questions, but I have not found an answer to this one about whether the archive option (rsync -a) ever misbehaves. I am transferring data from field instruments running Debian etch to a central server running Debian lenny. My command is below:
Code:
rsync -av --remove-source-files --log-file=rsync_20110612_0656Z.log ./20100616/ archive@bigserver:/mnt/ZAP_DATA/20100616/zap2/

After rsync runs, the directories it touches on bigserver have very strange permissions
as follows:
Code:
d-wxrw--wt 2 root root 4.0K 2010-10-26 04:31 20101026

This says that directory 20100226 can be written by anybody, but can't even be read by its owner! I thought rsync was messing things up, but in the process of writing this question I discovered that the original files that I am trying to sync have these crazy permissions. So I no longer have a question, but if future LQers think that rsync -a is messing up their permissions, this post may confirm that it is merely copying their messed up permissions from somewhere else, as it is supposed to do!

View 1 Replies View Related

Debian Configuration :: Rsync - Not Creating Files On Host

Aug 2, 2015

Having an issue with rsync

I launch the following

Code: Select allrsync -avz --remove-source-files --log-file=/home/pi/rsync.log --temp-dir
=/data/temp --partial --progress -e "ssh" 192.168.1.100://data/ext/downloads/File.ext /data/

Basically I download to main PC and rsync to my pi as the pi has a fraction of the speed for some reason when downloading form a source outside of my network.

The first few files will sync fine. Then I start getting errors like this

Code: Select allrsync: rename "/data/temp/.File.ext.y1716M" -> "File.ext": No such file or directory
(2)

The directory on the host has user and group ownership as pi. Rsync has been setup to login without a password.

View 0 Replies View Related

Server :: NFS With Directories Permissions?

Oct 4, 2010

I'm planning a NFS share for a small enterprise (25 NFS clients). I need to create a directory structure but I'll need to set up differents permissions (rw/ro) to some directories of the tree. I wonder if it's possible to grant access using groups IDs, so that would be ideal for this application. Is it possible? I was thinking that I would kneed some kind of centralized user info, such as NIS or LDAP. Is that necessary?

View 4 Replies View Related

General :: Giving Ownership While Creating Directories?

Jan 27, 2010

Is there any way by which one can give ownership while creating directories itself. It should be one command otherwise it requires root login to change ownership of a directory.

View 4 Replies View Related

Server :: SVN And SSH - Creating Directories For Projects In Repo

Feb 18, 2011

I am setting up an SVN server (svn+ssh) that will be used by students at the university where I work. I was considering in the beginning, one single repository and eventually creating directories for each project inside the repository. It seems to me now, that it is not very secure way of doing things. The directory on the server will be with rights 770 and this means that every student can come on the server and sweep out the whole repository.

Also mistakenly or not, every student can 'svn delete' the whole repository, which could be a nightmare to recover from. An issue might be to create groups and then assign users to groups and then create many repositories and each repository to be assigned with group. This means that I will have to manage tens or hundreds of repositories -- maybe not very common task. What is an optimal solution for this working environment.

View 5 Replies View Related

Red Hat / Fedora :: Permissions With CIFS Share And Rsync

Jan 28, 2011

am trying to sync data from Server A to Server B. The destination on Server B is a CIFS share and I need to preserve timestamps, permissions, etc. on all the data that I transfer. During the rsync process, I receive thousands of errors like the one below:
rsync: chown "/LBDCASAN001/JasonHarper/files/1259810304676/2010-12-22-01-00-03/0x22/0xc8/0x43/0x0a" failed: Permission denied (13)

I'm not sure if it's related at all, but my mount point on Server B has the permissions set as: drwxr-xr-x 2 root root when it is unmounted. When I mount the CIFS share, the mount point permissions change to: drwxrws---+ 3 root root

Also, here is the line from my /etc/fstab that mounts the share:
//X.X.X.X/LBXXXXX001 /LBXXXXX001 cifs username=LBXXXXX001,password=XXXXXXX!,uid=0,gid=0 0 0
When I perform the rsync, I'm authenticating to Server B from Server A as root.

View 6 Replies View Related

General :: What Is Rsync Flag To Ignore Permissions

Apr 8, 2010

I am using Rsync to backup files to a another machine, the users on my fileserver do not exist on the backup server so Rsync throws errors about the permissions. It copies the files fine but I want to get rid of the errors and have Rsync ignore the permissions when backing up.
/backup is a mounted ftp directory

Below is the current command and output:
Code:
root@Fileserver:~# rsync -av --delete /shared/fileshare/ /backup/backup
building file list ... done
created directory /backup/backup
./
manager/ .....
rsync: chown "/backup/backup/manager/.chironfs.txt.c6MbJ7" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.hdBG4P" failed: Operation not permitted (1) .....
sent 211115 bytes received 274 bytes 7686.87 bytes/sec
total size is 210263 speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]

View 3 Replies View Related

Software :: Transferring File Permissions Using Rsync

Feb 3, 2010

I am using rsync to backup data from a file server to a external device, the data is accessed from windows boxes via samba with their own usernames, user1, user2 etc... Rsync is failing to copy the file permissions when sending to the external device, I have tested sending to a ftp server and a usb hard drive and received the same error, see below:

Code:
root@Fileserver:~# rsync -avz --delete-after /shared/fileshare/ /backup/backup
building file list ... done
./
manager/
rsync: chown "/backup/backup/manager/cronman.txt" failed: Operation not permitted (1)
public/ .....
sent 339 bytes received 104 bytes 886.00 bytes/sec
total size is 4593 speedup is 10.37
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
When I backup to a local directory the permissions are copied correctly.

View 4 Replies View Related

Software :: RHEL 5.5 - Rsync Not Retaining Permissions

Jan 28, 2011

I've got an older RHEL 5.5 server that we're using for our company email server. We're going to retire this server and I've created a new Debian Linux server as it's replacement. Now I'm trying to rsync all the users /home/ directories to the new server however when I tested this, I noticed a problem. In the old source server where I'm running the actual rsync command from, everyone's home directory is owned by their unique UID and a generic GID (100 = users). So when I execute this command on the old RHEL 5.5 server:

Code:
rsync -e ssh -avz /home/* root@192.168.0.101:/home

Why are all the users home directories being owned by root:root on the target server? It's not owned by root:root on RHEL 5.5 and the only thing I can think of is my rsync command is wrong. According to the man page, I can see that using the -a switch should preserve all file ownership and much more. It's not doing this on the target Debian server. If it tries to copy over /home/bob and it's owned by bob:users, if Debian didn't know or have a UID for Bob, wouldn't it just assign a UID from RHEL 5.5 to the Debian server? So like /hone/bob would be owned by 1009:users?

View 3 Replies View Related

Ubuntu Servers :: Rsync Backup - Transfer Files With Appropriate Permissions

Dec 4, 2010

I wrote a script to wake up my windows machine and do an rsync backup of some of my files. I wanted to make this command a accessible through local bin so I made it executable. However the problem is that when I copies files is copies them with root permissions and i can edit or delete them. How can I set the files so they transfer with the proper permissions for my Ubuntu user?

Code:
#!/bin/bash
# Description: This script first wakes up the client machine and syncs the appropriate folders.
# Finally the script shuts down the client if it was off to begin with.
if [ "$(whoami)" != "root" ]; then
echo "Permission Denied"
exit 1
fi .....

View 8 Replies View Related

Ubuntu :: Photorec Rovered File Directories Permissions?

May 4, 2010

I recently accidentally deleted a wrong directory of images from a USB memory stick, which I managed to successfully recover using Photorec . Photorec created a couple of directories (which I asked it to put in Documents), which i was then able to re copy back onto the USB disc. My problem now however is that I do not need that almost 4GB of files on my PC but I cannot delete them since the files are all root owner, and being somewhat new to ubuntu I am not sure of how to go about changing the permissions and deleting these files.

View 4 Replies View Related

Fedora :: Edit The Permissions For Directories In 12?

Mar 22, 2010

I tried using Nautilus - nada (under root no less). Tried using file browser (nada again) Tried going to "places" and the directory I wanted - right click, permissions won't let me change squat. The folders I want to change are shared folders on my network at home and sometimes I transfer files between computers to different places. Can't do it tho, cuz of the permissions. Is CHMOD the answer? If so, how do I do it? For instance, In terminal, I issued the command (as root) chmod 777 movies I thought this would allow any device in the house to write to this directory, but the permissions didn't change at all. So what do I have to do?

On my Ubuntu machine I simply run Nautilus as root and it allows me to do this.
So what's different in Fedora?

View 3 Replies View Related

General :: Permissions To Backup Some Directories?

Apr 30, 2010

I need to backup some Directories but
sudo chmod 777 *
Wont include permissions for daughter dirs

View 2 Replies View Related

Server :: Rsync To Windows / File Permissions & Owners?

Feb 7, 2010

Don't ask me why, but I need to back up a website with complete structure to a windows machine (so no tar/gzip - just an identical copy). I'm experienced with rsync, so I thought to do it that way. However, in the process I'm bound to lose my ownership/permission settings for each file and that will give problems when placing back certain files. Is there a way to either:

1. save those settings on a windows machine?
2. have an easy way to save the filetree with relevant information and a shell script to attach the info back when uploading files again?

View 2 Replies View Related

Ubuntu Security :: Restricting 'cd' Access To Directories Without Adjusting Permissions

Apr 13, 2010

Is there a way to restrict users that are logged into the shell via SSH/Telnet/SFTP from using the 'cd' command to move into certain directories, yet not use the chmod command to do it? For instance, restrict users logged in from accessing the /var/www/ folder but have it still accessible using a web browser. Also, would this defeat the purpose since they could just wget from it if its still web accessible through a browser?

View 8 Replies View Related

Ubuntu :: Set Default File Permissions For Newly Created Directories?

Nov 18, 2010

I'm just wondering: I know that umask sets the default file permissions for files, however I want to know if there is anyway to set default file permissions for newly created directories.

For example, I want my user to create new directories that anyone can access and modify (777) but I want the new files the user creates to be 755 (read by everyone, written only by user).

Is this possible?

View 1 Replies View Related







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