Can't modify/create files on USB stick

Joe momendo at yahoo.com
Sun Oct 10 15:26:12 UTC 2004


I put a USB stick (256MB USB2 Sandisk) and firewire
iPOD and tried to edit text files. Nautilus says I
don't have permissions to edit files, nor can I create
any files on the disks.

Working folder:
/media/usbdisk/unix_help

Editing a text file from double-clicking a text file
in Nautilus brings up gEdit. I make a change and try
to save, it gives a permissions error. I chmod 777 *
on the text files and the command executes but the
permissions of the text files dont reflect the change.
I check dmesg and I get this error:

audit(1097420510.446:0): avc:  denied  { associate }
for  pid=4607 exe=/usr/bin/gedit
name=.gedit-save-dRYCB1
scontext=user_u:object_r:removable_t
tcontext=system_u:object_r:removable_t
tclass=filesystem

I try to create a new "empty file" in nautilus and
again I get permission denied. dmesg reports this:

audit(1097421666.756:0): avc:  denied  { associate }
for  pid=4539 exe=/usr/bin/nautilus
name=.vfs-write.tmp
scontext=user_u:object_r:removable_t
tcontext=system_u:object_r:removable_t
tclass=filesystem

Attempting to copy an existing file and pasting to the
same folder gives a permissions error and dmesg
reports:

audit(1097421730.569:0): avc:  denied  { associate }
for  pid=4539 exe=/usr/bin/nautilus
name=.vfs-write.tmp
scontext=user_u:object_r:removable_t
tcontext=system_u:object_r:removable_t
tclass=filesystem

However, editing a text file from the command line
using vim, the kernel does allow the file to save my
edits. But there is still errors in dmesg:

audit(1097421875.980:0): avc:  denied  { associate }
for  pid=4721 exe=/usr/bin/vim
name=.cheat_sheet.txt.swp
scontext=user_u:object_r:removable_t
tcontext=system_u:object_r:removable_t
tclass=filesystem
audit(1097421875.980:0): avc:  denied  { associate }
for  pid=4721 exe=/usr/bin/vim
name=.cheat_sheet.txt.swp
scontext=user_u:object_r:removable_t
tcontext=system_u:object_r:removable_t
tclass=filesystem
audit(1097421883.100:0): avc:  denied  { associate }
for  pid=4721 exe=/usr/bin/vim name=4913
scontext=user_u:object_r:removable_t
tcontext=system_u:object_r:removable_t
tclass=filesystem
audit(1097421883.100:0): avc:  denied  { associate }
for  pid=4721 exe=/usr/bin/vim name=cheat_sheet.txt~
scontext=user_u:object_r:removable_t
tcontext=system_u:object_r:removable_t
tclass=filesystem

Switching to root user and editing the files has no
effect. Are these due to permissions not being set
correctly in SELinux? How do I fix this so I can
save/edit/copy/create files on removable storage?

Joe


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com




More information about the test mailing list