LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-16-2006, 10:54 AM   #1
Byronious
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Rep: Reputation: 0
Writing a script to do a few actions... having issues...


I'm currently writing a script for a class I am taking. We were to create a server computer and a client computer. On the server, we were to create an account called admin. The admin account was then to have access to a script that will delete a user and then move their home folder to another directory called /orphans/[username]. The problem I'm having is that when I execute the script, it seems to work find until it moves the directory, I get an access denied.

The script is owned by root and the group for the script is administrators (which the admin account is in). The script is set as SUID.

Any help would greatly be appreciated.
 
Old 11-16-2006, 10:57 AM   #2
Black Chaos
LQ Newbie
 
Registered: Jan 2005
Posts: 15

Rep: Reputation: 0
What is the permissions in the /orphans directory?
 
Old 11-16-2006, 11:03 AM   #3
Byronious
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Owned by root, read/write for group (admin).
 
Old 11-16-2006, 11:08 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Is /orphans on a read-only filesystem?
 
Old 11-16-2006, 11:10 AM   #5
Byronious
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Nope, it's in the same filesystem as /home.
 
Old 11-16-2006, 11:12 AM   #6
Black Chaos
LQ Newbie
 
Registered: Jan 2005
Posts: 15

Rep: Reputation: 0
Do you have write access to the /home dir. If your doing a mv it will delete the folder out of home which would require write access...
 
Old 11-16-2006, 11:17 AM   #7
Byronious
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
I think that may be my issue.
 
Old 11-25-2006, 10:57 AM   #8
Byronious
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
If the script is set user ID, should it not matter though as the script is owned by root?
 
Old 11-27-2006, 08:33 AM   #9
Byronious
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Anyone have any more input?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help writing with SH script? SirJinX Programming 1 01-24-2006 06:57 AM
help with writing a script jedimastermopar Linux - General 10 05-02-2005 02:34 PM
Need help writing a script wswartz Linux - Software 3 04-28-2004 04:35 PM
Help Writing a script. teeth44 Programming 2 10-14-2003 01:00 PM
writing a Script spanky5125 Linux - Security 5 01-08-2002 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration