Results 1 to 10 of 12
I just loaded PETSc (numerical library) on my new WD Passport USB drive and tried:
$ ./configure
and got:
bash: ./configure: Permission denied
I then checked permissions:
$ ls -l ...
- 02-06-2012 #1Just Joined!
- Join Date
- Feb 2012
- Posts
- 9
Can't change permission on files on my new WD Passport (on Fedora 16)
I just loaded PETSc (numerical library) on my new WD Passport USB drive and tried:
$ ./configure
and got:
bash: ./configure: Permission denied
I then checked permissions:
$ ls -l configure
-rw-------. 1 jski jski 340 Aug 31 12:33 configure
I don't have execute permission.
Tried: $ chmod 777 configure
No change.
Tried: $ su -c 'chmod 777 configure'
No change.
What gives?
How can I change permissions on files on this USB drive/device (on Fedora 16)?
BTW, looked on the web (ask.fedoraproject.org) and found this:
Q: I've just installed Fedora 16 after having FC11 for 3 years or so. What I noticed is that my USB media is connected and accessible, but it's impossible to change permissions (using FAT32 and NTFS volumes) and it is given 'rw' only for the owner, so it is impossible to execute linux applications on that volume or scripts.
I would really appreciate your help. Reading through the internet for the last 5 hours didn't yield much and the user interface tools don't match.
A: I'm guessing this is because the devices are mounted as noexec by default. Verify this by running mount in a terminal. For a temporary workaround, you can try changing the permissions on the folders by using chmod as root. I'll have to dig up how one can change default mount parameters for USB devices, probably using policy kit.
---John
- 02-06-2012 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
What file system is the drive formatted as? It is likely either NTFS or FAT. You cannot use FAT file systems for running Linux software since they don't support the required file/directory attributes. Ditto NTFS for the most part. You need to reformat the drive to use a Linux/Unix file system, such as ext2/3/4, ufs, xfs, jfs, etc.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-06-2012 #3Just Joined!
- Join Date
- Feb 2012
- Posts
- 9
Probably FAT32.
Newbie question: what is the best/preferred way to reformat the drive?
---John
- 02-06-2012 #4Just Joined!
- Join Date
- Feb 2012
- Posts
- 9
mkfs.ext4 /dev/sdb1 ???
- 02-06-2012 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
1. Boot system.
2. Plug drive in.
3. After it automounts, right click on the icon and check the properties to see what device it is, such as /dev/sdb1, etc.
4. Since you already downloaded the application (probably as a compressed tar file), then copy that to your system drive. Copying it to /tmp would be just fine. That way you won't have to download it again.
5. Right click on the icon again, and select "unmount". This will make the icon go away - that's ok.
6. Open a terminal / command-line window and switch to root with the command "su -" - it will ask for your root password. Not necessary if you originally logged in as root.
7. Now, format the file system. The current preferred file system for Linux is ext4, so do this (assuming the drive's file system was on /dev/sdb1):
The -c option will scan the hard drive for bad sectors and map those out of use if it finds any, before it creates the actual file system. This is optional, but good practice, and will give you time to go get a nice cup of coffee while you wait!Code:mkfs -t ext4 -c /dev/sdb1

Once the file system is created, you should be able to remove it, plug it back in, and verify that it will still auto-mount ok. Assuming it does, then you can create a user-accessible directory on the drive (which will be mounted in /media) to hold your data, and move the file you copied to /tmp there. I do stuff like this all the time, and I create a link in my user space to the directory so when it is connected to the system all I have to do is cd to that directory in order to configure and build stuff I loaded there.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-06-2012 #6
- 02-07-2012 #7Just Joined!
- Join Date
- Feb 2012
- Posts
- 9
Checking in /etc/mtab (before the device is unmounted/"ejected") I find:
/dev/sdb1 /media/Passport fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,defa ult_permissions,allow_other,blksize=4096 0 0
I tried:
# mkfs -t ext4 -c /dev/sdb1
mke2fs 1.41.14 (22-Dec-2010)
Could not stat /dev/sdb1 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
Properties simply says: Location: /media
Should I try:
# mkfs -t ext4 -c /media
???
---John
- 02-07-2012 #8Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-07-2012 #9Just Joined!
- Join Date
- Feb 2012
- Posts
- 9
I did unmount it first (using the "eject" icon in Nautilus) .
Then I tried:
# mkfs -t ext4 -c /dev/sdb1
and got:
mke2fs 1.41.14 (22-Dec-2010)
Could not stat /dev/sdb1 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
---John
- 02-07-2012 #10Just Joined!
- Join Date
- Feb 2012
- Posts
- 9
BTW, I am logged in as root when doing this.


Reply With Quote
