Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

how to change files to excutable mode?

when i input in uclinux shell :

 chmod 777 myfile

the shell say:

myfile: Read-Only system

well, how to change file mode?

thanks !

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Check to see what type of file system this file is on? My bet is you're trying to change permissions on a romfs (read-only) filesystem or some other "read only" filesystem.

    Cheers,

    - slacker
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    yes ,it is romfs, but do you know how to change the permission of files in such system or nios IDE? thanks

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Read only is read only is read only. There is no way to change the permissions to write to a romfs filesystem. By definition, it is impossible.

    You need to read up on the available filesystems (perhaps, ramfs, jffs -- on flash, etc.), implement one of those filesystems.

    If you're asking how to _change_ a particular file on a romfs filesystem, that is covered in the Microtronix-provided documentation. Start reading. :-)

    Cheers,

    - slacker
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi sunclever,

    > do you know how to change the permission of files in such system or nios IDE?

    I went through this some time ago before switching to cramfs/jffs2, so the

    following is subject to memory loss ;-) ...

    I believe all you need to do is give your file an 'exe' extension. When the romfs is

    created via the IDE, the exe extension is removed and the execute attribute

    should be set.

    Regards,

    --Scott