Hi,
when I installed debian 8, all files are created and owned by root, when I add new user, for example marco, he can't create directory or change files created by root. I tried with ftp, permission denied.
so, I am interested how to grant to user marco ownership of all files in the system so he can make directories, files, change existing files (owned by root), etc?
I tried to add marco in /etc/sudoers ALL=(ALL:ALL) ALL the same as root, but it didn't help. I added also user marco to the root group but again the same situation.
I must use another user, because proftpd refuses root, they/developers got idea that all people will have sever with 100 users and I just want one ftp user (root), but proftpd refuses root user. now I must use marco or proftpd user and grant to that user ownership of all files in the system.
ALL files in the system? I doubt that. You should have an ftp working directory, or a few of those, or maybe a user's home directory, to send and receive files. These can be chowned or chmoded. The rest should be left alone.
I have NEVER seen one true unix system where a user owned all files, there are very good reasons why, and if we showed you how to give marco the ownership of alll, the next post you will be sending is how to get on your box that isnt working propely anymore... and all that can be done is a complete reinstall.. Is that what you want?
In other terms, users have right given by root, at some places only... That is what you have to decide: Where should marco have right to do what he want other than his home directory... It cannot be in a system file-system so forget about /bin etc....
Usually users have dedicated filsystems for their soft and data e.g. oracle
Okay, thank you for informationm, then marco should be able to do what he wants in /var/www and it subfolders (html in debian, it is like public_html), but /var/www/html is onwed by www-data/apache.
should I then assign user apache to proftpd or I should somehow assign www folder to marco? but then in first case, I should make password for user apache and I don't think it is good. any advice?
What group is /var/www assigned to? Make marco belong to that group as well.
And, of course, chmod /var/www accordingly.
Hi, thank you for answer,
/var/www/html folder belongs to the user "apache/www-data" and to the group "root".
therefore, I assigned user proftpd (marco, whatever) to the group root and after that I tried to create folder and files, I could do it only in html folder, not outside of it. that's what I wanted.
to change files everywhere, i can use sftp instead of ftp, sftp let me to login as root and change and create files anywhere in the system. I tried it now with winscp and filezilla and it works. when I login as proftpd I can change files only in /var/www/html
for people who need the same solution, use next commands, just change proftpd with your parameters, marco, proftpd, anything, adapt it to your case:
this topic can be marked as solved.
We have regularly questions about how to create users and user accounts. But regularly user accounts need to be deleted too. It is quite easy to delete the user account itself but usually the HOME directory of the user remains.
It is good style to remove these directories but simply deleting... (3 Replies)
Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal.
I want to give some users a root level access.
Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way
Regards
ADI (4 Replies)
Hi!! one strange problem occurred with my RHEL 5 box.
i'm having logs folder with ownership of non-root user. Created some files with root user under logs folder.
here is the scene:
-rw-r----- 1 root root 1048227 Feb 28 12:34 SystemOut_13.02.28_12.34.10.log
-rw-r----- 1 root root ... (6 Replies)
I've been through many threads before i decide to create a separate thread.
I can't really find the solution to my (simple) problem.
Here's what I'm trying to achieve:
As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user.
The only to achieve this is to... (1 Reply)
Hi
I'm logged in to an AIX box now and we need to do an audit on this box.
cbssapr01:# pwd
/
Which command will show all the files and directories owned by root user with permissions as 777 ? (8 Replies)
hi
i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help
Thanks (5 Replies)
Hi all,
I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
I want to delete some files and directories owned by root from another different user in HP-UX 10.20.
The list of files looks like:
(user test)
bash-2.03$ ls -alrt
total 20 ... (2 Replies)