Skip to content

Permissions and root access

For every selected item the side panel states what the user of the session may do, and why. The statement is calculated from the owner, the group and the mode of the item, and from the groups of the user.

Situation Statement
The user is root The user is root and has no permission limits
The user owns the item The owner bits apply
The user belongs to the group of the item The group bits apply
Neither of the above The bits for others apply

For a folder the panel states whether its contents can be listed and whether items can be created and deleted inside. For several selected items it counts how many are not readable or not writable. This explains most permission problems without leaving the screen.

When the user has no permission to read a folder, the list is replaced by a message that names the folder, the owner, the group and the mode, and that states the user who cannot open it. If root access is available, the message offers a button to open the folder with the root connection.

A regular user can browse, upload, edit and delete files as root through sudo. This is a separate switch, because files that are created or uploaded as root belong to root.

  1. Turn on sudo for the session.
  2. In the Files screen, select Root access (Use root (sudo)).
  3. Work as usual. A notice states that files are handled as root, that uploaded files and new items belong to root, and which user is the session user.
  4. Select Back to the user when the work is finished.

Technically Portway opens a second SFTP channel that runs sudo sftp-server, so every file operation runs as root. Changing the owner of a file always goes through a shell command, because SFTP cannot map user names. The switch is written to the audit log.

  • If sudo is off, the Files screen asks to turn it on first.
  • If sudo is on but root access is not, a notice states that file operations still run as the session user.
  • If the server has no sftp-server binary that can run through sudo, for example because SFTP is configured as internal-sftp, Portway reports that and keeps working as the session user.