# Manage SFTP permissions

Manage SFTP permissions on Evotec with practical examples, usage guidance, and reusable project workflows.

Project

Transferetto

Small PowerShell module with FTPS/SFTP functionality

[View on GitHub](https://github.com/EvotecIT/Transferetto) [Visit Website](#) [Releases](https://github.com/EvotecIT/Transferetto/releases/tag/Transferetto-v2.0.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/Transferetto)

Stars**93**

Forks**18**

Open issues**0**

PowerShell Gallery downloads**14067470**

Release**v2.0.4**

Language: C# Updated: 2026-11-17

Curated Examples

Use Transferetto to inspect SFTP attributes, update chmod values, and change timestamps.

This pattern is useful when a deployment or maintenance script needs to inspect remote attributes and then update permissions or timestamps in a controlled way.

It is adapted from the source example at `Examples/Example27-SFTPAttributesAndPermissions.ps1`.

## When to use this pattern

- You need to confirm the current metadata on a remote file.
- The workflow should set a specific chmod value.
- A timestamp change should be part of the release or maintenance step.

## Example

```powershell
Import-Module Transferetto

$sftpClient = Connect-SFTP -Server 'sftp.example.com' -Credential (Get-Credential)

Get-SFTPItem -SftpClient $sftpClient -Path '/var/www/site/index.html'
Get-SFTPChmod -SftpClient $sftpClient -Path '/var/www/site/index.html'

Set-SFTPChmod -SftpClient $sftpClient -Path '/var/www/site/index.html' -Permissions '644' -PassThru
Set-SFTPTimestamp -SftpClient $sftpClient -Path '/var/www/site/index.html' -LastWriteTime (Get-Date).AddMinutes(-5) -PassThru

Disconnect-SFTP -SftpClient $sftpClient
```

## What this demonstrates

- inspecting remote file attributes and effective permissions
- setting an octal-style chmod value through the SFTP lane
- updating the last-write timestamp on a remote file

## Source

- [Example27-SFTPAttributesAndPermissions.ps1](https://github.com/EvotecIT/Transferetto/blob/master/Examples/Example27-SFTPAttributesAndPermissions.ps1)

<!-- PowerForge markdown artifact sha256:73F3859201B5E5B7E18B9F6630969067F96B7D2B81359E89B7742749905860BC -->
