UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Opening / saving a file with root permissions?

    Scheduled Pinned Locked Moved Solved Support
    4 Posts 2 Posters 256 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • F Offline
        Fizz
        last edited by

        Hi all-

        I want to modify a simple config file, but it is kept in a read-only directly (several layers under /opt/ ). I can open the file in Seabass2 (from File Manager). But after i make my edits i can't save, with it saying i don't have permissions. How can i open the file in Seabass2 such that i can then save my edits?

        -Fizz

        (PS: Don't worry- it's not a system file- it's for a downloaded app, it's not going to break the system... πŸ™‚ )

        arubislanderA 1 Reply Last reply Reply Quote 0
        • arubislanderA Offline
          arubislander @Fizz
          last edited by

          @Fizz I don't believe there are currently any apps that facilitate editing text files with elevated permissions.

          To achieve what you want, you would need to edit the file from the command line.

          πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
          Happily running Ubuntu Touch
          Google Pixel 3a (20.04 DEV)
          JingPad (24.04 preview)
          Meizu Pro 5 (16.04 DEV)

          F 1 Reply Last reply Reply Quote 0
          • F Offline
            Fizz @arubislander
            last edited by

            @arubislander
            I haven't found one either. So i edited the permissions from the command line and was then able to open in Seabass2 (through terminal).

            So i guess we can mark this one as solved. Thanks.

            -Fizz

            arubislanderA 1 Reply Last reply Reply Quote 0
            • F Fizz has marked this topic as solved on
            • arubislanderA Offline
              arubislander @Fizz
              last edited by

              @Fizz That is an interesting way of going about it. But I guess it works.

              In general though, changing ownership / permissions of system files is not recommended, so be sure to change them back to what they were when you are done editing them.

              πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
              Happily running Ubuntu Touch
              Google Pixel 3a (20.04 DEV)
              JingPad (24.04 preview)
              Meizu Pro 5 (16.04 DEV)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post