Ubuntu :: File Permissions For Copied Files On External HDD?
Mar 24, 2010
I'm sure that the issue I'm having is easily solvable once I gain some understanding about copying files - and file permissions in Ubuntu. Here's my situation:
I have an external HDD where I like to back up some files (I mess around with distros on my main machine and feel less stressed knowing the important stuff is backed up). I have an ext4 partition on the external drive where I have copied files, both through the terminal (cp 'filename' /dev/sdc3) and by drag and drop (gnome-terminal).
The problem is, once the files are copied, most are inaccessible. I can view them, but some directories and individual files say I do not have permission to open them. Others are accessible. This is from the same user profile that copied them.
How do I see what's going on? More importantly, how do I make files on external drives available to any user or OS (that can handle ext4)? I want to make sure that if my whole system gets effed that I could still do a reinstall of my OS and then access those backup files.
How to set the default file permissions on ALL newly created files in linux - but differs in important ways:
I want all files created in (or copied to or moved to) a certain directory to inherit a set of default permissions that is different from the system default.
Rationale: The directory in question is the "intake hopper" for an application. Users in a group place files in the directory, and the app (running under another user id in the same group) takes them and processes them. The problem is that the owner of each file placed in the directory is the user that placed it there, and the permissions are defaulting to "rw-r--r--"; I want to change that to "rw-rw----". The app doing the intake can't do that explicitly, because the user id the app is running under doesn't own the file in question, and the default permissions don't allow the app to chmod on the file! Obviously, the user could do a chmod after putting the file there - but I want to keep the "drop" by the user as simple as possible. (These folks are not linux-literate, they just drag and drop the files from their windows desktop to a (Samba) network share - i.e. they don't even know they are interacting with a linux system.)
umask seems too powerful: I don't want to set default permissions for every file created anywhere by these users - just those created in (or placed in) this directory.
When viewed using Ubuntu 8.4 files and dates on a Windows partition appear normal both in file manager and terminal. However booting using Knoppix CD these files are all green, and I cannot change their permissions, even as root. ie: everything is green including text files etc. If I copy them to a linux partition, I can change their permissions and make them nonexecutable and nonwritable. Also on the Windows FAT32 partition the . directory has the date 1 Jan 1970.
If I disable any green files, I can shutdown and reboot cleanly. If I don't I start having problems shutting down [/usr/sbin/init ?] And always these follow a pattern:
Can't remember details as I have now corralled the beast but error messages relating to:
I was wondering, what if you had a flash drive formatted with an FS that has UNIX permissions. Then what if you copied some of your files onto it. And then put it into another computer that has a user account by the same name. WIll the user be able to access the files?What if you named your own user differently on the other computer, will you be able to get your files?
I've just read that I can't change the file permissions of files and folders if they are sitting in what was my old Windows D: drive. Is this correct? If so what is the work-around?
I don't want to have to cut and paste that entire D: drive's contents over to a recognised Ubuntu folder. I had in my mind that this D drive would continue to be my data dumping ground, to which I need read/write access to.
I'm having an issue that I've seen before on other OS's (Solaris), but I'm coming up blank on solving for an NFS mount shared from RedHat I've googled this, and looked through all the FAQs and mail lists I can find.
The issue is this:
Whenever a new file is created from an NFS client to an NFS mounted file system, the group and world permissions are being stripped such that any new file created ends up with 0600 as the file permissions. On the server, I have tried various sharing options (all_squash, anonuid, anongid, no_acl) with no luck. I've looked at the underlying mount point ownership and permissions, checked the file system acl's (getfacl...they match the visible file system), and set the custom SELinux (not mine) config to permissive. The file system is on an LVM partition, and has an SELinux group assigned in /etc/fstab. I've unmounted it, and performed a vanilla mount (no options). No amount of trial and error is working. Any file created by any user on an nfs client machine creates files with 0600 permissions, and local users on the nfs server create files with permissions based off their umask settings. I originally thought it was due to mismatches in permissions from Windows to Linux (The server also NFS shares to Windows 2K boxes using hclnfsd (PC/NFS)), but I confirmed the same issue between RedHat systems.
One thing I'm wondering from my reading. It's mentioned in many places that ownership should be root in most cases and not some other user. This entire file structure is owned by a user that is ONLY local to the server box (long story, but the box is isolated....no DNS and only local users and settings).
I copied several folders over to a thumbdrive in Terminal, but I can't see the folders when I view the thumbdrive on any other system (tried a machine with xp and another with Ubuntu).I went back to the original machine where I did the coping and viewed the thumbdrive's contents in Terminal, and it shows everything to be there that I had copied. Is there a step I'm missing? I copied using cp -r. The reason I'm doing this is that the Ubuntu installation on the original machine is freezing up and I just want to backup some of the files before reinstalling Ubuntu.
I have all of my music in mp3 form on an external HD. When I copy it to my home folder for use in Banshee 2.0, some of the music files become corrupted.When these copied mp3s are played, they have annoying, intermittent distortion throughout some of the songs. In an effort to try and isolate the problem, played one of the distorted songs directly from the file on the external HD, and it played flawlessly. I then downloaded Clementine and had the exact same distortion on the playback from the copied file, and then no distortion from the external HD file.
So at this point, it seems like the mp3 are getting messed up when they are being copied from the external HD to the computer.I am using a USB 2.0 port for the file copying.
A bunch of my .rtf files suddenly (within the last few days, not sure when) have the "Allow Executing File as Program" box checked under their file Permissions. So whenever I try to open an rtf document, it asks if I want to run it. What's up with that?
I checked the 'Run executable text files when they are opened' option in Nautilus preferences. I have noticed that files such as .sh and .bin launch by simply clicking on then (which is great). However I have also noticed that an ordinary .txt and .html file must not be marked as executable in order to launch it in Gedit and Firefox respectively via clicking. Otherwise you must right click and open with every time. What file types need to have execute permissions? What file types never need to have execute permissions?
I am trying to write a script to copy all of my photos to my backup drive, to finish it i want to scan the backup and check that all of the folders and photos are there. is there a command in linux to do this (theres one (or two) for everything else!!!)
Lately I've tried rsync for backing up my home partition to an external drive, but I've run into some problems with some flac files (there might be other problematic files though, these are the ones I know of). The external drive is formatted in ntfs. Now, when adding my whole music directory (within my home directory) first as a library to VLC and then copying to the playlist, some files are not playable. I discovered this at work in windows, and resaved all the flac files using ex falso to skip windows incompatible characters. The problem persisted though. I tried the same thing in VLC in Ubuntu, and got again a set of non-playable files, partly, but not completely, overlapping the set of files that were not playable in windows. The original files (on my internal drive) are playable in VLC in Ubuntu. What to do (except to go back to cp instead of rsync, rsync is faster, but if it doesn't copy correctly, it's not worth it)?
I have an embedded linux system (Debian 'Lenny') which booting from a microSD flash. If I make a copy of a file on the flash file system (cp test test1) and then power off (disconnect power spontanious). Connects power again and the system come up, but the file test1 is gone. How can I secure that test1 is NOT disappear if the power get lost?If I copy file and then restart system with reboot command, the file test1 does not disappear.
I have the cowon iAudio7 music player with vfat file system and increasingly running into permission problems when I try to delete files. Unsurprisingly I am now running out of space. I am figuring if I could somehow mount it onto a folder in my home partition I will have full permissions. The problem is the drives name which is exactly with space: So even if try to delete files in the terminal I don't know how to cd into:
Code: /media/I AUDIO7 note the space between I & AUDIO7.
I got around 6,000 songs that I copied from my ipod to my external hard drive through rhythmbox, but for some reason it didn't copy over any extensions (all of my music files are mp3's) so I was wondering what would be a really simple way to add the extension to all the files in the music folder. My folders are setup like /Music/Artist/Album/song.mp3 (well right now there is no .mp3 but ya get the point
I'm interested to hear what config/settings files - or whole folders - you've managed to simply copy over from your previous installation and have working in the new. This can be either for specific programs or for parts of the system, but I suppose most of what people would find useful is getting some of their programs back to how they had them. These can be individual files or whole folders, but if there is a settings folder for a program but only one of the files is actually worth copying, just mention the one file and what it does. Also interested in hearing from KDE and Xfce users, for the benefit of those of us who have multiple desktop environments in the same system. (Besides, even those with only Gnome will use some of the great KDE apps like Amarok and K3b).
Here are my contributions: (~/ denotes your home folder; any subfolders starting with a period [.] are hidden files or folders) ~/.cache/rhythmbox/covers (the folder containing all your album cover art displayed in Rhythmbox) ~/.gnome2/nautilus-scripts (any scripts you added to Nautilus will be in this folder) ~/.lyrics (the folder containing all your song lyrics displayed in Rhythmbox) ~/.local/share/rhythmbox/rhythmdb.xml (Rhythmbox's database file; if you were forced to edit this because of some incorrectly displayed tags, don't forget to copy it over). ~/.gconf/apps/rhythmbox/plugins/ (Rhythmbox's plugins folder; plugins should be accessible when you restart Rythmbox). ~/.bash_aliases (Terminal command aliases you may have created will be in this file). ~/.gconf/apps/nautilus/preferences/%gconf.xml (Nautilus folder preferences file) ~/.mozilla/firefox (Folder for Firefox settings, cache, bookmarks, etc. If there are 2 or more subfolders with names like 2tb4r91t.default just copy over the latest one, and make sure profiles.ini points to it) ~/.thunderbird (Mozilla Thunderbird folder with all accounts, emails, settings, etc)
I'm using a dual boot system with kubuntu 10.10 and windows vista.When I try to copy files from kubuntu to a windows drive, I see no problem.But when I retsart to windows usually I can't see my files. Once or twice I have seen files I copied in kubuntu. The strange thing is that when I go to kubuntu again, I don't see files I have copied in windows drive.
If I execute the following command: cp -R /myfiles /mydestination
If myfiles contains several sub-directories and files, in what order will they be copied? For example, directories might be named 0123a, 9993c, myfolder, xfolder.
They are not copied in alphabetical order OR in date order OR in the order they appear when using a standard ls command as far as I can tell, so what actually does determine the order?
Edit: I am trying to determine the order that the cp command uses in order to determine how far along my copy command made it before it stopped. For example, I was hoping to be able to determine it copied 3 of the 4 directories successfully.
I have an old Dell Inspiron 8200 which I use for doing my CCNA study on. I installed Ubuntu 9.10 and it the cairo dock, all was running great, a little sluggish at times but thaht was down to the integrated display adaptor, no problem. I then decided to try out Open Suse but didnt like it so reformatted the whole disk back to Ubuntu then my problems started.
After going through the installation, I found the computer would only boot in the live CD mode, no files were copied. I then reformatted back to Windows XP and try top set up a dual boot system but the same results!, no data on my hard drive from Ubuntu!!. I then installed a new hard drive and tried a new dual boot installation but with the same results, what is stopping the machine form installing Ubuntu
I have multiple OpenSuSE 11.2 systems. With some files being on one system I would like to have another computer to have the files as well. Is there a way to have the files copied to the other system automatically? FTP is one way but it is too cumbersome. I am thinking of something like disk or directory mirroring. Does OpenSuSE have something like that?
If it was real time mirroring that would be better. I.e if a write to one file on one system is done, then this would be done on the other system with the same directory/file.
I recently had data recovered and it was sent back to me on what I think is an NTFS drive. I copied all the files over to a file share I have on a Linux box, that's ext4. Now I have that share mounted on my OSX machine, and I can't move or rename most of the files. However, in a couple cases I was able to rename a folder after the third try. Another time I was able to rename a folder once, but not again. All the permissions are showing up the same on the command-line -- I can't see any differences between the permissions on any of the files/folders. Note that I can create new folders and add files no problem, and then rename and move those all I want.
I have ran into a permissions problem. It seems that any file I have created with Fedora I can browse to in Firefox. I cannot browse to files that I have downloaded from the internet or copied locally across our network. I changed file permissions to 755 and 777 for these files. I even thought that maybe it was the php file content that was causing the issue. So, I copied the file content from file 2 into file 1. File 1 was the file I could always browse to since I created it in Fedora. I could still browse to file 1 after it had file 2's content.
I look at the permissions and they appear the same for both files. I am not sure why I cannot open the other files. I downloaded phpMyAdmin. I cannot hit any of these files in a browser. I also copied some files from a a backup location we have internally. I cannot browse to any of these files either. I used chmod 777 filename. Even after doing that I could not hit any of the files. I moved the files into my document root directory ( /var/www/html ) and I still cannot browse to these files.
I have two systems running on linux. system one is running with RHEL 5.4/X86_64 hardware, system two is running with RHEL 5.3/i686 hardware. One filesystem is shared from system two and mounted as NFS on system one. Now when i do a copy from local filesystem to the NFS share from system one,it shows as follows
-rw-r--r-- 1 xkinved rbak1 30 Mar 3 2011 king
But if i do copy with -p option then it shows right time stamp. Both machines are running with slight(minutes) different in time. Does this could be cause for this problem? The problem is happening while i do FTP from some other machines too.
I have iomega appliance, which is based on Debian distribution. There is an NFS share that I have created which is without password. Since it is without password, there are some viruses copied. I want to find out which IP address is the source of these files. In other words, I want to know which PC is copying these infected files on the NFS share
I'm pretty sure I'm in over my head with this one. Here's the situation: My practice has been, after downloading and making changes to files, to use a certain GUI cataloging app to move them to categorized sub-folders inside one "umbrella" folder, then copy them to (what are in most cases) identically-named sub-folders in another one on the same HD. Emulation of this process on the command-line would look like:
This was in anticipation of making a "twin" of the second, now bigger, "umbrella" folder on anexternal HD and continuing the practice. At some point I intended to get rid of the original 2nd "parent folder" and just keep the first one on the drive with my OS install, using the twin on the backup folder as I'd been doing when it was on that same drive.
I'm very close (a matter of 2 to 3 weeks, it looks like) to getting a backup/external drive in a reasonably-reliable external enclosure. With the backup, originally the "twin" of the bigger "umbrella" folder and its sub-directories, on that other drive, I also anticipate that I will likely go at least a few days between backing up any new files to it.
For the sake of argument, let's say I gave the external the name "tuxs_twin". Is there any way to monitor copying activity from /Pictures/ on the boot HD to /media/tuxs_twin/Pictures/ and log the dates and times, then have something running that checks the log every so many hours and puts up a reminder dialog saying /tuxs_twin/Pictures/ hasn't had any new files copied to it since date X at time Y? I hope this was clear enough. If not, I'll try to break it down further when I know which details are confusing folks.
I wanted to make a simple script that would trigger on certain environment events. For instance, I want the script to trigger whenever a new file gets copied or placed on the Desktop, and cut that file and place it somewhere else. Sort of cleaning the Desktop process. Here's the thing: I want to trigger on it's own, not requiring me to open shell and invoke it from there