LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-29-2012, 11:02 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Rep: Reputation: 53
Unable to change owner


Hi all,

Ubuntu 12.04 desktop 64bit
external enclosure HD 640G, USB connection (/dev/sdb)

I expect using the HD on the external enclosure for storage purpose without partion. The HD has been successfully blanked with dd

When I ran
sudo mkfs.vfat /dev/sdb
it complained not allowing without partition and requesting adding -I

sudo mkfs.vfat -I /dev/sdb
it worked adding the FS

After mounting the external enclosure;
$ sudo cp test.txt /mnt
worked without probem but the file is owned by root

change owner
$ sudo chown satimis:satimis /mnt/test.txt
it complained 'permission not allowed'

Also tried as root without result.

Whether I must create partition on the external enclosure HD? Can I create a single partition using the whole HD?

Please advise. TIA

B.R.
satimis
 
Old 12-29-2012, 11:15 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,683

Rep: Reputation: 420Reputation: 420Reputation: 420Reputation: 420Reputation: 420
You are better off creating a single partition which uses the whole disk. Then the disk will have a label (partition table) so it will be discovered properly.

Then put your file system on /dev/sdb1.

The permission problem could be caused by selinux. Check in /var/log/messages.
 
Old 12-29-2012, 11:20 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Quote:
Originally Posted by smallpond View Post
You are better off creating a single partition which uses the whole disk. Then the disk will have a label (partition table) so it will be discovered properly.

Then put your file system on /dev/sdb1.
Noted and thanks

Quote:
The permission problem could be caused by selinux. Check in /var/log/messages.
No messages file.

$ ls /var/log/
Code:
alternatives.log  dmesg.1.gz      kern.log.1         syslog.3.gz
apt               dmesg.2.gz      kern.log.2.gz      syslog.4.gz
aptitude          dmesg.3.gz      lastlog            syslog.5.gz
auth.log          dmesg.4.gz      libvirt            syslog.6.gz
auth.log.1        dpkg.log        lightdm            syslog.7.gz
auth.log.2.gz     faillog         mail.err           udev
boot              fontconfig.log  mail.log           ufw.log
boot.log          fsck            news               unattended-upgrades
btmp              gdm             pm-powersave.log   upstart
ConsoleKit        hp              samba              vbox-install.log
cups              installer       speech-dispatcher  wtmp
dist-upgrade      jockey.log      syslog             Xorg.0.log
dmesg             jockey.log.1    syslog.1           Xorg.0.log.old
dmesg.0           kern.log        syslog.2.gz
Edit:

I have some old Windows stuff for storage. Ext4 is the later FS. Can I use it instead of vfat?

satimis

Last edited by satimis; 12-29-2012 at 11:29 AM.
 
Old 12-29-2012, 12:30 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,153

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by satimis View Post
...
I have some old Windows stuff for storage. Ext4 is the later FS. Can I use it instead of vfat?
...
It depends on what you want to do with those old files. If you want to be able to use them on a Windows(TM) system, they will need to be in a partition that the limited propitiatory system can read (FAT of NTFS). On the other hand, if they are just data files that you want to keep around for historical purposes, converting them to a modern format might make more sense. (There are many tools available to do the conversion if you wish to do so.)

Re you permission problem: A FAT file system does not implement any file access controls. (After all, it was designed for a single-user, personnel system, with no network access.) If you want access permissions on files in a FAT partition, use the uid or gid mount options to set them when you mount the partition in you file system. When a FAT partition is mounted on you file system, the file owner and group default to root, so you need to override that default when the fs is mounted if you want some other user or group to be able to access the files.
 
Old 12-30-2012, 01:26 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Quote:
Originally Posted by PTrenholme View Post
It depends on what you want to do with those old files. If you want to be able to use them on a Windows(TM) system, they will need to be in a partition that the limited propitiatory system can read (FAT of NTFS). On the other hand, if they are just data files that you want to keep around for historical purposes, converting them to a modern format might make more sense. (There are many tools available to do the conversion if you wish to do so.)

- snip -
The HD is for storage purpose only. In case I need running those Windows files I'll copy them to Windows PC to run them. I won't run them direct on the external enclosure. Besides most of them were either saved on Windows Notepad or MSOffice format.

Would .ext4 be the suitable format for my application? If YES I'll format the HD on ext4 FS running;
Code:
$ sudo mkfs.ext4 /dev/sdb
TIA

Other advice noted and thanks

Regards
satimis
 
Old 01-02-2013, 02:52 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,153

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Again, the answer is "yes and no," but mostly "yes."

The Notpad files should not present any problem, and can, of course, be used in most Linux programs (noting that the extra carriage-return character next to the new-line character [added because the MS format was intended to be used on a print device, not a display device]). (See the dos2unix command if you want to remove the unneeded carriage-return characters.)

The MS Office files are (most likely) in a propitiatory format that current versions on MS Office may not be able to read, although Office will usually read, but not write, older formats. (That's a MS marketing decision to encourage users to buy newer versions.) But putting those files in an ext4 fs and copying them back to a MS fs (FAT or NTFS) should be transparent to the MS system.

If you want to abandon the MS system, either LibreOffice or OpenOffice should have no problem with files of those types. (LibreOffice was branched from OpenOffice when Oracle purchased OpenOffice and changed the licencing terms in a way that some developers found to be objectionable.)
 
Old 01-02-2013, 02:58 PM   #7
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 843
Blog Entries: 2

Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by satimis View Post
Would .ext4 be the suitable format for my application?
I would have thought so. Does vfat even have owners? And if not you can't be surprised at chown failing.
 
Old 01-02-2013, 03:27 PM   #8
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,141

Rep: Reputation: 322Reputation: 322Reputation: 322Reputation: 322
No -- there's no such thing as an owner (or access permission, as alluded to by PTrenholm) in a VFAT file. As long as you plan to only mount the drive on a Linux system (and use it to copy and files you mat need to Windows) ext4 should work just fine.
 
Old 01-03-2013, 12:08 AM   #9
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi all,

I format the HD on the USB external enclosure with ext2 and store all data file on it. Windows applications such as .txt and .doc can be read direct on the HD with LibreOffice and Gedit without copying them to the running OS. I'll test them on Windows OS after migrating Windows VMs from the OLD HD to the NEW HD (I'm now working on VMs migration)

Thanks

Edit:
on vfat format permission(owner) doesn't exist on files.

satimis

Last edited by satimis; 01-03-2013 at 12:09 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Why does mv change the owner in one system but not another? Stannley Linux - Newbie 2 07-04-2011 04:19 AM
How to change 1000 owner Jan Tanjo Linux - Newbie 2 12-24-2008 08:56 PM
can't change owner of directory miner49er Linux - Networking 1 05-04-2006 04:58 PM
Change owner arubin Linux - Newbie 3 04-30-2004 01:23 PM
Change owner juno Linux - General 3 01-08-2003 08:03 AM


All times are GMT -5. The time now is 04:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration