Skip to main content

How should ito change folder permissions during package installation

I'm making a deb package to install a custom application. I changed all files/folders ownership to root in order to avoid the warnings iI was getting during installation, and in ubuntuUbuntu all runs smoothly, as ubuntuUbuntu changes the ownership of the files/folders to the user installing the package.

But when i'mI'm installing on Debian, root remains the owner. The application uses a folder to write data, and here is the problem. Running as a standard user, the app does not have permission to write on the folder.

Now, how should iI deal with this problem? Should iI make a post install script on the deb package, doing the 'chmod o+w'chmod o+w? Should iI package the directory already with those permissions set?

Or is there any way of setting the owner of the files to the user that installs the app automatically (like ubuntuUbuntu does)?

How should i change folder permissions during package installation

I'm making a deb package to install a custom application. I changed all files/folders ownership to root in order to avoid the warnings i was getting during installation, and in ubuntu all runs smoothly, as ubuntu changes the ownership of the files/folders to the user installing the package.

But when i'm installing on Debian, root remains the owner. The application uses a folder to write data, and here is the problem. Running as a standard user, the app does not have permission to write on the folder.

Now, how should i deal with this problem? Should i make a post install script on the deb package, doing the 'chmod o+w'? Should i package the directory already with those permissions set?

Or is there any way of setting the owner of the files to the user that installs the app automatically (like ubuntu does)?

How to change folder permissions during package installation

I'm making a deb package to install a custom application. I changed all files/folders ownership to root in order to avoid the warnings I was getting during installation, and in Ubuntu all runs smoothly, as Ubuntu changes the ownership of the files/folders to the user installing the package.

But when I'm installing on Debian, root remains the owner. The application uses a folder to write data, and here is the problem. Running as a standard user, the app does not have permission to write on the folder.

Now, how should I deal with this problem? Should I make a post install script on the deb package, doing the chmod o+w? Should I package the directory already with those permissions set?

Or is there any way of setting the owner of the files to the user that installs the app automatically (like Ubuntu does)?

Source Link
Nuno V.
  • 103
  • 1
  • 2
  • 8

How should i change folder permissions during package installation

I'm making a deb package to install a custom application. I changed all files/folders ownership to root in order to avoid the warnings i was getting during installation, and in ubuntu all runs smoothly, as ubuntu changes the ownership of the files/folders to the user installing the package.

But when i'm installing on Debian, root remains the owner. The application uses a folder to write data, and here is the problem. Running as a standard user, the app does not have permission to write on the folder.

Now, how should i deal with this problem? Should i make a post install script on the deb package, doing the 'chmod o+w'? Should i package the directory already with those permissions set?

Or is there any way of setting the owner of the files to the user that installs the app automatically (like ubuntu does)?