View Single Post
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#3
Originally Posted by nieldk View Post
good post, only one thing.
You dont need (read: should not) run as root.
There really are no necessary reason for running rpmbuild as root,
the %defatr section defines the default permissions (in your example user:root and group:root) you can, and should also set permission in the %files section as needed per folder/file, and in some cases the default %defattr root:root will result in eg configuration files not being readable by normal user (nemo)
As rpmbuild builds in ~/rpmbuild directory tree it is able to create the rpm as user nemo etc.
Thanks
I just never tried do this as USER, I use WinSCP and Putty and it easily to do as ROOT or as USER and transfer files where you want.
If you start as USER you can't create folders from the first commands and if you already did it as ROOT you can just continue to other commands as root too
 

The Following User Says Thank You to Schturman For This Useful Post: