Linux FileSysten Manipulation
I am trying to change the file attributes of my txt file on Linux I want to make the file read only! "sudo chown root:root filename.txt" "sudo chmod 444 filename.txt" and it's perfectly working on my Linux ! but when I shared the file to the android mobile, file permissions are changing automatically! from where my file is getting permission of 'w' writing? how to prevent that ? I want my file as read only even if i share it with others.
8/5/2021 2:51:07 PMRatnapal Shende
3 AnswersNew Answer
that is an operating system thing so it won't work as you expect it to. If you set a file to read only on your Linux computer, it will know that file is read only for all its users Since your Android is not a user of that operating system, it will ignore the attributes set by the Linux computer's operating system. extra can ignore: I think this worked on windows 98 and/or xp I remember downloading files that had pre set permission attributes 🤔
Well leme explain in layman terms.... consider its possible to create a read-only file that works as read only throughout every os (all other computers)... now that would cause a really big issue (say you create a virus and made it read only now suddenly no one would be able to delete it 😆) There's common myth that read only files would work across any os / any pc which is not possible .. it will be read-only only on your pc ... hope u got it 「ＨＡＰＰＹ ＴＯ ＨＥＬＰ」 and Martin Taylor explained this very well in lil indepth