New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
change owner of folder
change owner of folder
Hi,
I've uploaded various files to my bubba2 from different computers. Unfortunately I put some files in my admin-folder and some in my user-folder and some files in the storage-folder. Somehow I've also managed to get different owners (admin/user) of the folders. This makes it hard for me to move the files into one folder.
Can anyone please tell me how to change the owner of a folder?
I'm not that experienced at debian (yet), but I've tried to move the folders from my visa computer using the explorer, the web-ui and winscp. No matter what I do I always get a "permission denied"-message.
I've also tried to edit the permissions of the folder via the web-ui, windows explorer and winscp but I get "permission denied".
I've uploaded various files to my bubba2 from different computers. Unfortunately I put some files in my admin-folder and some in my user-folder and some files in the storage-folder. Somehow I've also managed to get different owners (admin/user) of the folders. This makes it hard for me to move the files into one folder.
Can anyone please tell me how to change the owner of a folder?
I'm not that experienced at debian (yet), but I've tried to move the folders from my visa computer using the explorer, the web-ui and winscp. No matter what I do I always get a "permission denied"-message.
I've also tried to edit the permissions of the folder via the web-ui, windows explorer and winscp but I get "permission denied".
Hi.
I use CHMOD.
Log in using SSH.
Become root
Password
Change folder and file preferences
BR,
Xargon[/code]
I use CHMOD.
Log in using SSH.
Become root
Code: Select all
su
Code: Select all
excito
Code: Select all
chmod -R 777 /directory/to/change/
Xargon[/code]
That wasn't probably the wisest choice; above command can render your system fully unusable and un-upgradable, with the only solution a full reinstall, the command that should have been issued is:ahab wrote:Thank you! Now I've changed the permissions so that I can work with the files![]()
For some reason it couldn't find the folder storage so I had to change the permission for all files (chmod -R 777 /)But it works, and that's what's important!
Code: Select all
chgrp -R users /home/storage
/Carl
Sadly no, as it's a destructive command. I assume correctly that you can't use "su" any more? (if you ran this on root /, then all setuid bits would have been removed from essential executables). If so, the only solution is a full reinstallation of the system. You might be able to keep the /home partition, as it doesn't contain any executables and such, and after reinstall of system, issue following commands:ahab wrote:Oops, is it possible to undo my chmod command?
Code: Select all
find /home -type f -exec chmod 0644 '{}' ';'
find /home -type d -exec chmod 0755 '{}' ';'
find /home/ -type d -a \( -wholename '/home/*/private' -o -wholename '/home/*/torrents' -o -wholename '/home/*/downloads' \) -exec chmod 0700 '{}' ';'
chmod 0777 /home/storage
chmod 0750 /home/web
chgrp -R users /home/storage
chown -R www-data:users /home/web
/Carl
Following command shows how /bin/su should look like:Xargon wrote:I have used it a lot both on Bubba and Bubba|Two and never had any problems. But I trust Carl so I guess I have to start using chgrp instead.
BR,
Xargon
Code: Select all
test@bubba:/home$ ls -l /bin/su
-rwsr-xr-x 1 root root 31000 2007-02-27 19:30 /bin/su

/Carl
No problem Xargon, it was my choice to use the command and after all you only learn from your own mistakes. Mistakes of others are pure entertainment...
Anyway, I noticed that the command didn't execute on all files, I got a lot of "operation not allowed"-messages. But still, some bad things must have happened since I can't access my bubba2 via putty anymore!
As soon as I start the terminal I get a "PuTTY fatal error"-message saying "Server unexpectedly closed network connection". Do you think this is related to the permissions?
Anyway, I can still access my files via WinSCP and the web-ui so I guess I'll have to make a back-up of all my files and then try a full reinstall. Is there a how-to for that?
Anyway, I noticed that the command didn't execute on all files, I got a lot of "operation not allowed"-messages. But still, some bad things must have happened since I can't access my bubba2 via putty anymore!
As soon as I start the terminal I get a "PuTTY fatal error"-message saying "Server unexpectedly closed network connection". Do you think this is related to the permissions?
Anyway, I can still access my files via WinSCP and the web-ui so I guess I'll have to make a back-up of all my files and then try a full reinstall. Is there a how-to for that?
Yes there is.
Download to usb-stick: http://update.excito.net/install/latest/bubba-two/
Read manual: http://download.excito.net/web/BubbaTwo ... index.html#
STANDARD INSTALLATION
Note: All your personal data will be lost if doing this operation. A complete hard drive format will be done.
Download the recovery image at: http://update.excito.net/install/latest/bubba-two/
Insert the USB memory stick in to your PC (minimum size 256 MByte) and format it, select FAT32 as file system if prompted. The USB stick must have a partition table.
Unzip the downloaded recovery image to the root catalogue on the USB stick.
Shut down Bubba|Two.
Remove power to Bubba|Two.
Place the USB memory in one of Bubba|Two's USB ports, which one doesn't matter.
Make sure that Bubba|Two's WAN port is connected to internet; this is needed during installation (to set time etc.).
Hold the power button pressed, keeping it pressed, and plug in the power cord to Bubba|Two again.
Wait until Bubba|Two begins to flash its LED, hold the button pressed for 5 seconds then release it. Bubba|Two will now automatically format the disk, and install the Linux file system on it. The installation will take about 15 minutes to complete with a 1 TB disk. Wait until the LED stops flashing.
Enter the web interface and do a Software update (as described in chapter Software Upgrade)
/X
Download to usb-stick: http://update.excito.net/install/latest/bubba-two/
Read manual: http://download.excito.net/web/BubbaTwo ... index.html#
STANDARD INSTALLATION
Note: All your personal data will be lost if doing this operation. A complete hard drive format will be done.
Download the recovery image at: http://update.excito.net/install/latest/bubba-two/
Insert the USB memory stick in to your PC (minimum size 256 MByte) and format it, select FAT32 as file system if prompted. The USB stick must have a partition table.
Unzip the downloaded recovery image to the root catalogue on the USB stick.
Shut down Bubba|Two.
Remove power to Bubba|Two.
Place the USB memory in one of Bubba|Two's USB ports, which one doesn't matter.
Make sure that Bubba|Two's WAN port is connected to internet; this is needed during installation (to set time etc.).
Hold the power button pressed, keeping it pressed, and plug in the power cord to Bubba|Two again.
Wait until Bubba|Two begins to flash its LED, hold the button pressed for 5 seconds then release it. Bubba|Two will now automatically format the disk, and install the Linux file system on it. The installation will take about 15 minutes to complete with a 1 TB disk. Wait until the LED stops flashing.
Enter the web interface and do a Software update (as described in chapter Software Upgrade)
/X
problem solved!!!
Now my bubba is back to normal! and the positivt thing is that I've got a back-up of all my pictures and I've upgraded to the latest firmware. All is well that ends well!
Please note that chmod 755 changes all bits.
A better option to use is , e.g.
chmod g+w
which only adds the write permission for the group.
the 3 'domains' are u == user g == group and o == others, a == all
the permissions are r == read, w == write, x == execute, s == sticky.
See "man chmod" for more or chmod --help which gives:
Usage: chmod [OPTION]... MODE[,MODE]... FILE...
or: chmod [OPTION]... OCTAL-MODE FILE...
or: chmod [OPTION]... --reference=RFILE FILE...
Change the mode of each FILE to MODE.
-c, --changes like verbose but report only when a change is made
--no-preserve-root do not treat `/' specially (the default)
--preserve-root fail to operate recursively on `/'
-f, --silent, --quiet suppress most error messages
-v, --verbose output a diagnostic for every file processed
--reference=RFILE use RFILE's mode instead of MODE values
-R, --recursive change files and directories recursively
--help display this help and exit
--version output version information and exit
Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.
A better option to use is , e.g.
chmod g+w
which only adds the write permission for the group.
the 3 'domains' are u == user g == group and o == others, a == all
the permissions are r == read, w == write, x == execute, s == sticky.
See "man chmod" for more or chmod --help which gives:
Usage: chmod [OPTION]... MODE[,MODE]... FILE...
or: chmod [OPTION]... OCTAL-MODE FILE...
or: chmod [OPTION]... --reference=RFILE FILE...
Change the mode of each FILE to MODE.
-c, --changes like verbose but report only when a change is made
--no-preserve-root do not treat `/' specially (the default)
--preserve-root fail to operate recursively on `/'
-f, --silent, --quiet suppress most error messages
-v, --verbose output a diagnostic for every file processed
--reference=RFILE use RFILE's mode instead of MODE values
-R, --recursive change files and directories recursively
--help display this help and exit
--version output version information and exit
Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.