• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
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 258 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 18 Dec 2023, 02:58

      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... πŸ™‚ )

      A 1 Reply Last reply 18 Dec 2023, 12:17 Reply Quote 0
      • A Offline
        arubislander @Fizz
        last edited by 18 Dec 2023, 12:17

        @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 19 Dec 2023, 13:19 Reply Quote 0
        • F Offline
          Fizz @arubislander
          last edited by 19 Dec 2023, 13:19

          @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

          A 1 Reply Last reply 19 Dec 2023, 13:56 Reply Quote 0
          • F Fizz has marked this topic as solved on 19 Dec 2023, 13:19
          • A Offline
            arubislander @Fizz
            last edited by 19 Dec 2023, 13:56

            @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
            2 out of 4
            • First post
              2/4
              Last post