Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4082816
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:14:04+00:00 2026-05-20T18:14:04+00:00

Strange thing. I have a shellscript that needs to be run with sudo since

  • 0

Strange thing. I have a shellscript that needs to be run with sudo since it uses dumpcap.

#!/bin/bash
# Simulates the transmissions with Sirannon

mkdir -p 3dvideos_streamed
mkdir -p 3dvideos_packetcapture

for file in Alt_moabit Book_arrival Door_flowers Leaving_laptop
do
  for qp in 10 15 25 32 45 60
  do
    echo "Now simulating transmission of $file with QP $qp ... "

    echo "Starting dumpcap ... "
    touch 3dvideos_packetcapture/$file-$qp.cap
    dumpcap -i lo -f "udp port 5000" -a duration:15 -w 3dvideos_packetcapture/$file-$qp.cap &

    cp 3dvideos_encoded/$file/qp$qp/test.264 3dvideos_streamed/$file-$qp-in.264 &

    echo "Starting sirannon ... "
    sirannon sirannon-0.6.8/dat/xml/mvc.xml 3dvideos_encoded/$file/qp$qp/test.264 3dvideos_streamed/$file-$qp 3dvideos_streamed/$file-$qp-out.264
    echo "Sirannon is done streaming."

    sleep 15    

  done
done

echo "Fixing permissions ... "
chmod -R 655 3dvideos_streamed
chmod -R 655 3dvideos_packetcapture

Now I’m left with this:

werner@savant:~/CACMTV$ ls -la 3dvideos_packetcapture/
ls: cannot access 3dvideos_packetcapture/Alt_moabit-60.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Book_arrival-60.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/..: Permission denied
ls: cannot access 3dvideos_packetcapture/Leaving_laptop-10.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Leaving_laptop-32.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Leaving_laptop-60.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Alt_moabit-25.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/.: Permission denied
ls: cannot access 3dvideos_packetcapture/Door_flowers-10.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Door_flowers-15.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Book_arrival-15.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Leaving_laptop-15.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Door_flowers-25.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Alt_moabit-10.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Door_flowers-32.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Leaving_laptop-25.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Book_arrival-45.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Alt_moabit-45.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Door_flowers-45.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Book_arrival-10.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Alt_moabit-15.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Door_flowers-60.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Leaving_laptop-45.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Alt_moabit-32.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Book_arrival-25.cap: Permission denied
ls: cannot access 3dvideos_packetcapture/Book_arrival-32.cap: Permission denied
total 0
d????????? ? ? ? ?                ? .
d????????? ? ? ? ?                ? ..
-????????? ? ? ? ?                ? Alt_moabit-10.cap
-????????? ? ? ? ?                ? Alt_moabit-15.cap
-????????? ? ? ? ?                ? Alt_moabit-25.cap
-????????? ? ? ? ?                ? Alt_moabit-32.cap
-????????? ? ? ? ?                ? Alt_moabit-45.cap
-????????? ? ? ? ?                ? Alt_moabit-60.cap
-????????? ? ? ? ?                ? Book_arrival-10.cap
-????????? ? ? ? ?                ? Book_arrival-15.cap
-????????? ? ? ? ?                ? Book_arrival-25.cap
-????????? ? ? ? ?                ? Book_arrival-32.cap
-????????? ? ? ? ?                ? Book_arrival-45.cap
-????????? ? ? ? ?                ? Book_arrival-60.cap
-????????? ? ? ? ?                ? Door_flowers-10.cap
-????????? ? ? ? ?                ? Door_flowers-15.cap
-????????? ? ? ? ?                ? Door_flowers-25.cap
-????????? ? ? ? ?                ? Door_flowers-32.cap
-????????? ? ? ? ?                ? Door_flowers-45.cap
-????????? ? ? ? ?                ? Door_flowers-60.cap
-????????? ? ? ? ?                ? Leaving_laptop-10.cap
-????????? ? ? ? ?                ? Leaving_laptop-15.cap
-????????? ? ? ? ?                ? Leaving_laptop-25.cap
-????????? ? ? ? ?                ? Leaving_laptop-32.cap
-????????? ? ? ? ?                ? Leaving_laptop-45.cap
-????????? ? ? ? ?                ? Leaving_laptop-60.cap

I can see the files in Nautilus, but I can’t open them:

How do I fix this – how would I need to change my shellscript in order for dumpcap to have the necessary permission but at the same time leave my permissions intact?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:14:04+00:00Added an answer on May 20, 2026 at 6:14 pm

    It turns out the easiest solution is to just run the command as:

    sudo ./script.sh -u werner
    

    Then all lines with chmod/chown are not needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have noticed a strange thing that happens on my web app when the
I have a kind of strange thing that I really nead for my text
Strange performance outcome, I have a LINQ to SQL query which uses several let
Strange thing – I have Authentication module in lib/ like this: module Authentication protected
I have installed gitosis, but i have strange thing when i'm working with repos.
Strange thing... I have a binding definition user-wrapper.xml: <binding> <include path=core-wrapper.xml /> <include path=user-composite-entity.xml
I have noticed a strange thing happening in jQuery and wonder if anyone knows
I have an FBML app and a strange thing keeps happening. If I go
Strange thing is happing with my .NET MVC deployment. I have tested my application
While reviewing Visual C++ codebase I found a following strange thing. A run-time assert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.