chown: changing ownership of '/file': Operation not permitted
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When running a deploy through bitbucket pipelines I started to get the error:
chown: changing ownership of '/file': Operation not permitted
on every file.
Here's a segment of the log.
-----------
```
Oryx Version: 0.2.20231027.1, Commit: 22314309551107182cffca9fc39d97480466c11c, ReleaseTagName: 20231027.1
Build Operation ID: 77108f9d7842c650
OS Type : bullseye
Image Type : jamstack
Detecting platforms...
Detected following platforms:
nodejs: 18.16.1
Version '18.16.1' of platform 'nodejs' is not installed. Generating script to install it...
Detected the following frameworks: Angular,Typescript,jQuery
Source directory : /opt/atlassian/pipelines/agent/build
Destination directory: /bin/staticsites/cb6100c0-f8f3-4903-b3fb-af653f4987e3-swa-oryx/app
Installing common platform dependencies...
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8062 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [259 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [17.7 kB]
Fetched 8547 kB in 1s (5938 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
libpq-dev libpq5 libtiff5
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 614 kB of archives.
After this operation, 3072 B of additional disk space will be used.
Get:1 http://deb.debian.org/debian-security bullseye-security/main amd64 libpq-dev amd64 13.13-0+deb11u1 [141 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security/main amd64 libpq5 amd64 13.13-0+deb11u1 [182 kB]
Get:3 http://deb.debian.org/debian-security bullseye-security/main amd64 libtiff5 amd64 4.2.0-1+deb11u5 [290 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 614 kB in 0s (24.2 MB/s)
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 20486 files and directories currently installed.)
Preparing to unpack .../libpq-dev_13.13-0+deb11u1_amd64.deb ...
Unpacking libpq-dev (13.13-0+deb11u1) over (13.11-0+deb11u1) ...
Preparing to unpack .../libpq5_13.13-0+deb11u1_amd64.deb ...
Unpacking libpq5:amd64 (13.13-0+deb11u1) over (13.11-0+deb11u1) ...
Preparing to unpack .../libtiff5_4.2.0-1+deb11u5_amd64.deb ...
Unpacking libtiff5:amd64 (4.2.0-1+deb11u5) over (4.2.0-1+deb11u4) ...
Setting up libpq5:amd64 (13.13-0+deb11u1) ...
Setting up libpq-dev (13.13-0+deb11u1) ...
Setting up libtiff5:amd64 (4.2.0-1+deb11u5) ...
Processing triggers for libc-bin (2.31-13+deb11u7) ...
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.30.2-1+deb11u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Downloading and extracting 'nodejs' version '18.16.1' to '/opt/nodejs/18.16.1'...
Detected image debian flavor: bullseye.
Downloaded in 1 sec(s).
Verifying checksum...
Extracting contents...
performing sha512 checksum for: nodejs...
Done in 2 sec(s).
Removing existing manifest file
Creating directory for command manifest file if it does not exist
Creating a manifest file...
Node Build Command Manifest file created.
Using Node version:
v18.16.1
Using Npm version:
9.5.1
chown: changing ownership of '/opt/atlassian/pipelines/agent/build/.vercel/project.json': Operation not permitted
chown: changing ownership of '/opt/atlassian/pipelines/agent/build/.vercel/README.txt': Operation not permitted
chown: changing ownership of '/opt/atlassian/pipelines/agent/build/.vercel': Operation not permitted
```
And so on with every file.
The log ends with:
```
---End of Oryx build logs---
Oryx has failed to build the solution.
For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting
```
------------
The process was working earlier, with:
Oryx Version: 0.2.20221103.1, Commit: a2c65dde152b749fea395f4d1242ea9350942258, ReleaseTagName: 20221103.1
But now that the version has changed, the error above shows up. I have an Angular webpage. This is the bitbucket-pipelines.yml file
```
options:
docker: true
size: 2x
pipelines:
branches:
Production:
- step:
name: Deploy to production
deployment: production
services:
- docker
script:
- pipe: microsoft/azure-static-web-apps-deploy:main
variables:
APP_LOCATION: '$BITBUCKET_CLONE_DIR'
OUTPUT_LOCATION: '$BITBUCKET_CLONE_DIR/dist/page'
API_TOKEN: $deployment_token
DEPLOYMENT_ENVIRONMENT: Production
APP_BUILD_COMMAND: npm run build:production
definitions:
services:
docker:
memory: 4096
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.