chmod not working on sdcard

Ridgeland

Member
Dec 14, 2010
285
9
I want to change a file on the sdcard to read-only.
From ls -l
----rwxr-x system sdcard_rw 593 2011-02-20 19:28 Day_Template.html
chmod 044 Day_Template.html
gives new ls -l
----rwxr-x system sdcard_rw 593 2011-02-20 19:28 Day_Template.html
chmod is ignored.

I can copy this file to /tmp and chmod works as expected
----r--r-- root root 593 2011-02-20 19:54 testfile

/sdcard/ is not cooperating. /nand/ shows the same problem.

Trivial information: We have a web site we use as a journal with photos. It's a simple CMS with php pages. For each new day's entry I need to create a simple pseudo web page (only tags are <h2>, <br>, <p> and <a href image>) For consistency and simplicity (no typing < or >) I want to use a template that is a read-only file so I cannot write to it by mistake. I've already tested camera card to card reader to Kyros, TextEdit to type in the the html for the php then AndFTP to upload photos and web pages. Worked fine. Typing is slow though. Unless someone knows a fix I'll just keep a redundant copy for safety.
 

l_n

Senior Member
Dec 28, 2010
788
99
fat32 filesystems do not support unix-style permissions. you'd have to reformat it ext[2,3,4].
 

Ridgeland

Member
Dec 14, 2010
285
9
I forgot that! It's Linux so I was expected anything but FAT, my bad.
Wonder if attrib -w works? I'm not sure how to do that without a MS PC.
Oh well redundant files for safety.
Thanks for the answer.
 
Top