LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cp read permission denied (https://www.linuxquestions.org/questions/linux-newbie-8/cp-read-permission-denied-757320/)

wolfgang_b 09-23-2009 01:40 PM

cp read permission denied
 
Hi,
I have this problem where i can't copy a few files from my pen drive.
Got the files from a public computer, with windows.

cp gives the following error--->
cp const1.java /home/user1/Documents/scjp
cp: cannot open `const1.java' for reading: Permission denied

lsattr shows this--->
lsattr const1.java
lsattr: Permission denied While reading flags on const1.java

mount shows this--->
/dev/sdc1 on /media/disk type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)

I have read a few other posts but haven't been able to solve my problem.
Please help.
Willing to try anything!

P.S: I use fedora 10

r3sistance 09-23-2009 01:46 PM

what filing system is the pendrive using? vfat/fat32 would be my guess... try enforcing the cp as root or with sudo as well, this might help, else wise windows permissioning on the files might be a little off...

linuxpokernut 09-23-2009 01:58 PM

Quote:

/dev/sdc1 on /media/disk type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
as root or sudo
Code:

#umount /dev/sdc1
mount -t vfat /dev/sdc1 /media/disk -o rw,uid=500,umask=000

Use your own user ID (no offense!). You can find it by
Code:

sh-3.1$ id
uid=500(jp) gid=100(users) groups=11(floppy),17(audio),18(video),19(cdrom),100(users)


wolfgang_b 09-30-2009 12:14 PM

hi,
thanx for the solutions,but they dont work.
had already tried su and sudo. tried changing permissions, doesnt work!
finally got the files in mail! but still would like to know of any other possible solutions(thats why im here, to learn). tried the mount technique also.

i would also like to mention that when i list the files in the pen drive,the folders appear in green(highlighted) and files appear in green.

ps: no offence taken for the comment on uid:cool:
also thanx for the prompt replies. sorry about my late reply


All times are GMT -5. The time now is 07:50 PM.