WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Having permission issues with sda2/sdb2 (HD's)  (Read 3706 times)

Offline LinuxUser01

  • Full Member
  • ***
  • Posts: 111
Having permission issues with sda2/sdb2 (HD's)
« on: January 11, 2013, 04:44:11 AM »
Firefox cannot save a single file to these two harddrives without giving me some kind of a permission denied message. I have formatted these two harddrives several months ago with swapfiles part of the partition for more virtual memory space. I remember using Tiny Core 4.6 and i would be able to save files with no problems before. The only way i can get this working is to go into console and type "sudo su" then "startx", then i would have an entirely clean from scratch desktop, but i'm able to save and delete. There are no errors on the drives since i have checked with e2fsck which probably has nothing to do with it. Any help would be greatly appreciated, thanks.


This is what i see in mounts (System Stats)
/dev/sdb2 on /mnt/sdb2 type ext2 (rw,nosuid,nodev,relatime,barrier=1)
/dev/sda2 on /mnt/sda2 type ext2 (rw,nosuid,nodev,relatime,barrier=1)

This is what i see in dmesg (System Stats)
EXT4-fs (sdb2): mounting ext2 file system using the ext4 subsystem
EXT4-fs (sdb2): warning: mounting unchecked fs, running e2fsck is recommended
EXT4-fs (sdb2): mounted filesystem without journal. Opts: (null)
EXT4-fs (sda2): mounting ext2 file system using the ext4 subsystem
EXT4-fs (sda2): warning: mounting unchecked fs, running e2fsck is recommended
EXT4-fs (sda2): mounted filesystem without journal. Opts: (null)
« Last Edit: January 11, 2013, 04:02:43 PM by LinuxUser01 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Having permission issues with sda2/sdb2 (HD's)
« Reply #1 on: January 11, 2013, 08:33:41 AM »
Hi LinuxUser01
Quote
The only way i can get this working is to go into console and type "sudo su" then "startx", then i would have an entirely clean from scratch desktop, but i'm able to save and delete.
You got a clean desktop because you logged in as different user that has there own home directory, in this case
user  root  whose home directory happens to be  root.
If you are trying to write to the root of sda1, you need to:
Code: [Select]
sudo chmod 775 /mnt/sda1
sudo chown tc:staff /mnt/sda1
If you need to write to a directory replace  /mnt/sda1  with  /mnt/sda1/directoryname
If you need to write to a file replace  /mnt/sda1  with  /mnt/sda1/directory/filename
If you need to write to a directory and all files and directories underneath it:
Code: [Select]
sudo chmod -R 775 /mnt/sda1/directoryname
sudo chown -R tc:staff /mnt/sda1/directoryname
Your problem probably stems from the fact that when you added the drives you had tor be  root  in order to create
directories on them, but did not change the owner and permission settings after you did that.

On a side note, you probably should not be asking questions about  Core17  on this forum as it is likely considered
to be a different distro. I answered it only because the nature of the question was relevant to Linux in general.

Offline LinuxUser01

  • Full Member
  • ***
  • Posts: 111
Re: Having permission issues with sda2/sdb2 (HD's)
« Reply #2 on: January 11, 2013, 04:29:33 PM »
Well, i took your advice regarding the last portion of your post. I don't have a "sda1", my flash drive which has Tiny Core installed is the "sdc1". I can't remember if i was in root or just tc when formatting these two harddrives, but before i wasn't having any issues downloading from Firefox and saving on to the harddrives or trying to modify directories or files on the harddrives. I can either download the extensions i need to reformat these two drives again, but this time do them in root, or i can just download a clean version of Tiny Core and see if that works to find the culprit. I'm not sure where i would type in those commands you have listed in your post. I'll keep you up-to-date, thanks.

Update:
Well, it certainly doesn't matter if i have a clean install version of Tiny Core because what you mentioned regarding being @root and formatting the harddrive was the cause. Anyhow so i got this clean install of TinyCore 4.7.3 and got Xfe installed and its telling me when i click properties on one of the drives, [Owner] User=root Group=root, and User has Read/Write/Execute checked, Group doesn't have Write checked, but only Read and Execute checked, Others doesn't have Write checked, only Read and Execute, and not sure what Special is. If i try to change any of these settings, Xfe just locks up and i'd have to Xkill it. I'm probably going to try to find which extensions i used to format the drives (Can only remember gparted) and see what i can do for now.

Update: Okay, so i went into Xfe as "superuser" this time and didn't have any issues changing those options. I set User as tc for both drives, and set Group as staff. I'm able to download files and save them on to the harddrives from Firefox now, and i have no issues modifying them from the file explorer. Once again thanks.

Update: So i took a look at the properties for sdc1 (Flash Drive) which i have TinyCore installed and it has the User/Group set as root, but for Group/Others it has all three checked. So i changed the settings for the two harddrives to match my flash drive, kept User/Group as root, and just checked Write for Group and Other. Everything still works fine.
« Last Edit: January 11, 2013, 07:28:41 PM by LinuxUser01 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Having permission issues with sda2/sdb2 (HD's)
« Reply #3 on: January 11, 2013, 10:16:07 PM »
If i try to change any of these settings, Xfe just locks up and i'd have to Xkill it.
Sounds like you ran into an Xfe bug which you might consider reporting.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline LinuxUser01

  • Full Member
  • ***
  • Posts: 111
Re: Having permission issues with sda2/sdb2 (HD's)
« Reply #4 on: January 11, 2013, 11:18:23 PM »
Okay, so i was alittle curious about this bug, so i tried changing a setting again in those harddrives, but instead of going into "superuser" mode, i just stayed in regular mode, but this time i received this error message, "Chmod in /mnt/sd2 failed: Operation not permitted". I have tried several times and been receiving the same messages, but no lock ups so far. If i do receive that lock up issue, where do i find the log, in dmesg?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Having permission issues with sda2/sdb2 (HD's)
« Reply #5 on: January 11, 2013, 11:23:43 PM »
Hi LinuxUser01
Maybe in dmesg. Or possibly it gets logged in  /var/log/messages  if you have syslog running.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Having permission issues with sda2/sdb2 (HD's)
« Reply #6 on: January 12, 2013, 02:00:35 AM »
Or perhaps /tmp/wm_errors, but best to start the app in question from a terminal.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)